Commit 5bff57e0 authored by Charlotte Bataille's avatar Charlotte Bataille
Browse files

feat/18080 : edit originator org

parent 31115261
Pipeline #14285 failed with stages
in 57 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"
......
......@@ -105,7 +105,8 @@ var ArchivesAction = {
requestCommunication : ['preserved', 'frozen'],
flagForRestitution : ['preserved'],
flagForTransfer : ['preserved'],
addToCollection : ['preserved', 'frozen', 'restituable', 'disposable', 'transferable']
addToCollection : ['preserved', 'frozen', 'restituable', 'disposable', 'transferable'],
originatorOrg : ['preserved']
},
getSelectedArchives : function(type) {
......
......@@ -19,6 +19,7 @@
<?hinclude recordsManagement/archive/archiveModificationModal/retentionRule.html?>
<?hinclude recordsManagement/archive/archiveModificationModal/requestCommunication.html?>
<?hinclude recordsManagement/archive/archiveModificationModal/archiveTransfer.html?>
<!-- <?hinclude recordsManagement/archive/archiveModificationModal/originatorOrg.html?> -->
</div>
</div>
</div>
......
<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
......@@ -96,6 +96,7 @@
cancelDestruction : '/recordsManagement/cancelDestruction',
freeze : '/recordsManagement/archive/freeze',
unfreeze : '/recordsManagement/archive/unfreeze'
/* originatorOrg : '/recordsManagement/archive/originatorOrg' */
},
actionsType : {},
modal : $('#modificationModal'),
......@@ -172,6 +173,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