X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/4b20a67ddb4ebea2c6e09d51ee48da5a856edef8..3401cb76521d238ddec0e5daed3f63d6e6dee34f:/forum/skins/default/templates/ask.html?ds=inline diff --git a/forum/skins/default/templates/ask.html b/forum/skins/default/templates/ask.html index 6be8f59..3f74b44 100644 --- a/forum/skins/default/templates/ask.html +++ b/forum/skins/default/templates/ask.html @@ -50,31 +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, 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 != "") { - yourWorkWillBeLost(e); + return yourWorkWillBeLost(e); } - return false; } window.addEventListener('beforeunload', beforeUnload, true); - function submitClicked() { - window.removeEventListener('beforeunload', beforeUnload, true); - $("input.submit").each(function() { - this.disabled=true; - }); - } - var related_questions_url = "{% url related_questions %}"; @@ -121,6 +124,7 @@
{{ form.tags.help_text }}
- {% if not request.user.is_authenticated %} - + {% if not request.user.is_authenticated %} + {% else %} - + {% endif %}