Commit dc8572a9 authored by Alexandre Goldstein's avatar Alexandre Goldstein
Browse files

feat(11684) update trads & function setTodayDocumentDate

parent 27ecf3cb
Pipeline #5781 failed with stages
......@@ -953,8 +953,8 @@ msgstr "Fichier conteneur"
msgid "Originating date"
msgstr "Date du document"
msgid "Today"
msgstr "Aujourd'hui"
msgid "Today's date"
msgstr "Date du jour"
msgid "Text indexation"
msgstr "Indexation du texte"
......
......@@ -24,7 +24,7 @@
<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>
<button type="button" class="input-sm form-control btn btn-primary" id="documentDateTodayButton">Today's date</button>
</div>
</div>
......@@ -122,13 +122,9 @@
}
};
function setTodayDocumentDate() {
dateInput = $("#originatingDate");
date = new Date().toLocaleDateString().replace(/\//g, "-");
dateInput.datepicker('setDate', date);
}
$('#documentDateTodayButton').on("click", setTodayDocumentDate);
$('#documentDateTodayButton').on("click", function(){
ArchiveForm.setTodayDocumentDate();
});
$("#archiveForm").keypress(function(e) {
//To disable Enter keypress in this form
......@@ -139,7 +135,6 @@
// ARCHIVE
$('#archivalProfile').on('change', function() {
setTodayDocumentDate();
ArchiveForm.loadProfile();
ArchiveForm.displayArchiveDescription();
});
......@@ -251,6 +246,13 @@
}
});
},
setTodayDocumentDate : function() {
dateInput = $("#originatingDate");
// TODO get dynamically the declared timezone in configuration.ini
const options = { day: 'numeric', month: 'numeric', year: 'numeric' };
date = new Date().toLocaleDateString("fr-FR",options).replace(/\//g, "-");
dateInput.datepicker('setDate', date);
},
loadProfile : function() {
var value = $('#archivalProfile').val();
......
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