Use latest form text

* Take the opportunity to reformat the source to not have so many hugely long lines.
* Put a few things through gettext that weren't going through it before
* Move 'Hold down Ctrl to select multiple files at once.' text to widget, out of
  help text for each individual control.
This commit is contained in:
2019-04-07 15:55:29 +01:00
parent dc84e1a09a
commit 5cc0b7cdc1
6 changed files with 238 additions and 160 deletions

View File

@ -253,6 +253,16 @@ class MultipleFilesWidget {
}
$(function() {
// Display OS-specific stuff
function os_class() {
if (navigator.platform.indexOf("Win") != -1) return "os-windows";
if (navigator.platform.indexOf("Mac") != -1) return "os-mac";
return "os-other";
}
document.querySelector('body').classList.add(os_class())
// Get the CSRF token for form submitting
let csrf_token = document.querySelector("[name=csrfmiddlewaretoken]").value
window.images = new MultipleFilesWidget(