Commit 69fa1d66 authored by Benjamin Rousselière's avatar Benjamin Rousselière
Browse files

feat (11684) : add button 'today' for document date on new and update archive

parent af2ca380
Pipeline #5680 failed with stages
in 22 seconds
......@@ -953,6 +953,9 @@ msgstr "Fichier conteneur"
msgid "Originating date"
msgstr "Date du document"
msgid "Today"
msgstr "Aujourd'hui"
msgid "Text indexation"
msgstr "Indexation du texte"
......
......@@ -20,9 +20,12 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Originating date</label>
<div class="input-group col-sm-9" style="padding-left: 15px; padding-right: 15px;">
<div class="col-sm-6">
<input class="input-sm form-control datePicker archiveInput" name="originatingDate" id="originatingDate" placeholder="Originating date"/>
</div>
<div class="col-sm-3">
<button type="button" class="input-sm form-control btn btn-primary" id="documentDateTodayButton">Today</button>
</div>
</div>
<div class="form-group" id="fileplanLevelDiv">
......@@ -119,11 +122,13 @@
}
};
$('#app_maarchRM_main').ready(function () {
function setTodayDocumentDate() {
dateInput = $("#originatingDate");
date = new Date().toLocaleDateString().replace(/\//g, "-");
dateInput.datepicker('setDate', date);
});
}
$('#documentDateTodayButton').on("click", setTodayDocumentDate);
$("#archiveForm").keypress(function(e) {
//To disable Enter keypress in this form
......@@ -134,6 +139,7 @@
// ARCHIVE
$('#archivalProfile').on('change', function() {
setTodayDocumentDate();
ArchiveForm.loadProfile();
ArchiveForm.displayArchiveDescription();
});
......
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