Commit 039a01aa authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Merge branch 'feat/18080_edit_originator_organization' into 'develop'

feat/18080 : edit originator org

See merge request !698
parents 1534b913 7b2d4a8f
Pipeline #14659 failed with stages
in 50 seconds
......@@ -220,6 +220,9 @@ msgctxt "org"
msgid "Originator"
msgstr "Service Producteur"
msgid "Originator organization"
msgstr "Service Producteur"
msgid "Archiver"
msgstr "Service d'Archives"
......@@ -357,6 +360,9 @@ msgstr "Demander la restitution"
msgid "Validate restitution"
msgstr "Valider la restitution"
msgid "Select an originator organization"
msgstr "Sélectionnez un service producteur"
msgid "Cancel restitution request"
msgstr "Annuler la demande de restitution"
......
<table id="originatorOrg" class="table table-condensed modificationForm">
<tr>
<td><strong>Originator organization</strong><span style="color:red">*</span</td>
<td>
<select id="originatorOrgSelect">
<option value="">Select an originator organization</option>
</select>
</td>
</tr>
</table>
<script type="text/javascript">
var originatorOrg_serialize = function() {
var parameter = {}
if ($('#originatorOrgSelect').find('option:selected').val()) {
parameter.registrationNumber = $('#originatorOrgSelect').find('option:selected').val();
}
if (!parameter.registrationNumber) {
gritter.show($('#empty_text').html(), false);
return -1;
}
return parameter;
}
var originatorOrg_load = function(archiveId, archiveName, type) {
$('#originatorOrg').css('display', '');
ModificationModal.loadOriginatorOrg();
}
var originatorOrg_loadMultiple = function() {
$('#originatorOrg').css('display', '');
ModificationModal.loadOriginatorOrg();
}
</script>
\ No newline at end of file
......@@ -180,6 +180,37 @@
});
},
/* loadOriginatorOrg : function() {
$.ajax({
type : "GET",
url : "http://maarchrm/organization/organization/search?enabled=true",
dataType : 'json',
success : function (response) {
var organizations = response;
$('#originatorOrgSelect').find('option').remove();
$.each(organizations, function (key, value) {
$('#originatorOrgSelect').append($('<option>', {
value: value.registrationNumber,
text: value.displayName
}));
});
var length = $('#originatorOrgSelect').children('option').length;
if (length === 0) {
$('#originatorOrgSelect').append($('<option>', {
value: '',
text: $('#empty_originatorOrg').html()
}));
}
$('#modificationModal').modal();
},
error : function (response) {
gritter.show(response.responseJSON.message, response.responseJSON.status, response.responseJSON.errors);
}
});
},
*/
loadRule: function(archiveId, archiveName) {
if (this.modalType ==='accessRule') {
url = '/recordsManagement/archive/accessRule/' + archiveId;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment