X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/3d2eba570bc4586884cc112b1920a4273b4d11c1..68b08ed5442bf968f91fed8c3339adcd324c4864:/forum/skins/default/templates/answer_edit.html diff --git a/forum/skins/default/templates/answer_edit.html b/forum/skins/default/templates/answer_edit.html index d7423af..9409f0d 100644 --- a/forum/skins/default/templates/answer_edit.html +++ b/forum/skins/default/templates/answer_edit.html @@ -35,30 +35,25 @@ }); - function submitClicked(e) { - if(!is_chrome) { + function submitClicked(e, f) { + if(!(browserTester('chrome') || browserTester('safari'))) { $("input.submit")[0].disabled=true; $("input.submit")[1].disabled=true; } window.removeEventListener('beforeunload', beforeUnload, true); + if (f) { + f.submit(); + } } function beforeUnload(e) { - var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; if($("textarea#editor")[0].value != answer) { - if(is_chrome) { - return "You sure you want to leave? Your work will be lost."; - } else { - yourWorkWillBeLost(e); - } - return false; + return yourWorkWillBeLost(e); } } window.addEventListener('beforeunload', beforeUnload, true); - var answer = ""; - var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; {% endblock %} @@ -68,7 +63,8 @@
-
+ + {% csrf_token %}
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
@@ -80,6 +76,7 @@
{% trans "toggle preview" %} + {% if settings.WIKI_ON %}
{{ form.wiki }} {{ form.wiki.label_tag }} @@ -94,8 +91,16 @@
{{ form.summary.help_text }}
- - + + {% if form.recaptcha %} +
+ {{ form.recaptcha.errors }} + {{ form.recaptcha }} +
+ {% endif %} + + +