X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/0a9d4cebb2f8d1b6573ecae577f41d460a40ffc3..76d6665baae1d1485b99323cc4dd2836661295aa:/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 557b072..7b34ba4 100644 --- a/forum/skins/default/templates/ask.html +++ b/forum/skins/default/templates/ask.html @@ -39,12 +39,16 @@ max: 20, multiple: true, multipleSeparator: " ", - /*formatItem: function(row, i, max) { + + /* + formatItem: function(row, i, max) { return row.n + " ("+ row.c +")"; }, formatResult: function(row, i, max){ return row.n; - }*/ + } + */ + formatItem: function(row, i, max, value) { return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")"; }, @@ -54,8 +58,23 @@ } }); + }); + function submitClicked(e) { + if(!(browserTester('chrome') || browserTester('safari'))) { + $("input.submit")[0].disabled=true; + } + window.removeEventListener('beforeunload', beforeUnload, true); + } + + function beforeUnload(e) { + if($("input#id_title")[0].value != "" || $("textarea#editor")[0].value != "" || $("input#id_tags")[0].value != "") { + return yourWorkWillBeLost(e); + } + } + window.addEventListener('beforeunload', beforeUnload, true); + var related_questions_url = "{% url related_questions %}"; @@ -121,10 +140,10 @@
{{ form.tags.help_text }}
- {% if not request.user.is_authenticated %} - + {% if not request.user.is_authenticated %} + {% else %} - + {% endif %}