X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c1a4dfda807ca08de7d3370fc421abc39d411264..40e2851e2e2bf5e35063597b30ada01d06d2cc11:/forum/skins/default/templates/ask.html?ds=sidebyside diff --git a/forum/skins/default/templates/ask.html b/forum/skins/default/templates/ask.html index 9549d29..3f74b44 100644 --- a/forum/skins/default/templates/ask.html +++ b/forum/skins/default/templates/ask.html @@ -50,34 +50,34 @@ */ formatItem: function(row, i, max, value) { - return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")"; + return row[1] + " (" + row[2] + ")"; }, formatResult: function(row, i, max, value){ - return row[0]; + return row[1]; } }); }); - function submitClicked(e) { - if(!is_chrome)$("input.submit")[0].disabled=true; + function submitClicked(e, f) { + if(!(browserTester('chrome') || browserTester('safari'))) { + $("input.submit")[0].disabled=true; + } window.removeEventListener('beforeunload', beforeUnload, true); + if (f) { + f.submit(); + } } function beforeUnload(e) { if($("input#id_title")[0].value != "" || $("textarea#editor")[0].value != "" || $("input#id_tags")[0].value != "") { - if(is_chrome) { - return "Are you sure you want to leave? Your work will be lost."; - } else { - yourWorkWillBeLost(e); - } + return yourWorkWillBeLost(e); } } window.addEventListener('beforeunload', beforeUnload, true); - var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; var related_questions_url = "{% url related_questions %}"; @@ -124,6 +124,7 @@ {% trans "toggle preview" %} + {% if settings.WIKI_ON %} {{ form.wiki }} {{ form.wiki.label_tag }} @@ -144,9 +145,9 @@ {{ form.tags.help_text }}

{% if not request.user.is_authenticated %} - + {% else %} - + {% endif %}