diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-16 14:50:41 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-16 14:50:41 +0200 |
commit | 43ee6b23cbc989bedc45435885382740e430d964 (patch) | |
tree | 2a38f84ebe4c517317e98b22f0743e29a99aa3cf /archaeological_finds/templates/ishtar | |
parent | ed157d70148ea1bf1a07524c094cd9f762439e08 (diff) | |
download | Ishtar-43ee6b23cbc989bedc45435885382740e430d964.tar.bz2 Ishtar-43ee6b23cbc989bedc45435885382740e430d964.zip |
Bulk update finds: auto fill verified date when check is changed
Diffstat (limited to 'archaeological_finds/templates/ishtar')
-rw-r--r-- | archaeological_finds/templates/ishtar/forms/qa_find_edit_form.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/archaeological_finds/templates/ishtar/forms/qa_find_edit_form.html b/archaeological_finds/templates/ishtar/forms/qa_find_edit_form.html new file mode 100644 index 000000000..da8beff08 --- /dev/null +++ b/archaeological_finds/templates/ishtar/forms/qa_find_edit_form.html @@ -0,0 +1,19 @@ +{% extends "ishtar/forms/qa_form.html" %} +{% block js_ready %} +$("#id_qa_checked_type").change(function(){ + if (!$("#id_qa_check_date").val()){ + var today = new Date(); + var dd = String(today.getDate()).padStart(2, '0'); + var mm = String(today.getMonth() + 1).padStart(2, '0'); + var yyyy = today.getFullYear(); + if (current_language == "fr"){ + today = dd + '/' + mm + '/' + yyyy; + $("#id_qa_check_date").val(today); + } + if (current_language == "en"){ + today = yyyy + '/' + mm + '/' + dd; + $("#id_qa_check_date").val(today); + } + } +}); +{% endblock %} |