diff --git a/apps/map/templates/map/form.html b/apps/map/templates/map/form.html index ad655c9..6692c0f 100644 --- a/apps/map/templates/map/form.html +++ b/apps/map/templates/map/form.html @@ -46,15 +46,18 @@ {% block inner %}
- You have a saved draft. -

Do you want to restore it? Restoring the draft will overwrite any other data you have input into the form below.

+ {% trans "You have a saved draft." %} +

{% trans "Do you want to restore it? Restoring the draft will overwrite any other data you have input into the form below." %}

- - + +
-
+ @@ -301,9 +304,7 @@ class SaveButton { constructor(div) { this.root = div this.root.className = "savebutton" - this.root.innerHTML = - '' + - ' ' + this.root.style.display = "block" this.element = { root: this.root, @@ -331,21 +332,21 @@ class SaveButton { switchStateUnsaved() { this.changeState({ - detailsText: "You have unsaved changes. Click here to save a draft, which you can access next time you are here." + detailsText: "{% trans "You have unsaved changes. Click here to save a draft, which you can access next time you are here." %}" }) } switchStateSaving() { this.changeState({ - buttonText: "Saving...", + buttonText: "{% trans "Saving..." %}", iconClasses: "fa fa-spinner fa-spin" }) } switchStateSaveSuccess() { this.changeState({ - buttonText: "Saved", - detailsText: "Saved successfully.", + buttonText: "{% trans "Saved" %}", + detailsText: "{% trans "Saved successfully." %}", iconClasses: "fa fa-check", buttonClickable: false }) @@ -353,7 +354,7 @@ class SaveButton { switchStateSaveFailed(reason = "") { this.changeState({ - detailsText: "Save failed! " + reason, + detailsText: "{% trans "Save failed! " %}" + reason, iconClasses: "fa fa-exclamation-triangle savebutton--icon-failed" }) } @@ -381,7 +382,7 @@ class DraftPrompt { // Delete button will delete the draft this.element.delete.addEventListener('click', () => { - if (window.confirm('Are you sure you want to delete your draft?')) { + if (window.confirm("{% trans 'Are you sure you want to delete your draft?' %}")) { this.switchStateDeleting() this.deleteDraft().then(ok => ok ? this.switchStateHidden() : @@ -420,7 +421,7 @@ class DraftPrompt { switchStateDeleteFailed() { this.changeState({ - details: 'Delete failed!' + details: '{% trans "Delete failed!" %}' }) } }