X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c1a4dfda807ca08de7d3370fc421abc39d411264..2444d6ffd7995be782615589fb1d5aef2c8277ce:/forum/skins/default/templates/question.html?ds=sidebyside diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index 010ed43..c6c4cde 100644 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -8,13 +8,16 @@ {% load humanize %} {% load i18n %} {% load cache %} -{% block metadescription %}{{question.summary}}{% endblock %} +{% block metadescription %}{{ question.meta_description }}{% endblock %} {% block metakeywords %}{{question.tagname_meta_generator}}{% endblock %} +{% block meta %} + + +{% endblock %} {% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %} {% block forejs %} - - {% if not question.nis.closed %} + @@ -43,30 +46,26 @@ }); }); - 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) { - var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; if($("textarea#editor")[0].value != "") { - if(is_chrome) { - return "Are you sure you want to leave? Your work will be lost."; - } else { - yourWorkWillBeLost(e); - } + return yourWorkWillBeLost(e); } var commentBoxes = $("textarea.commentBox"); for(var index = 0; index < commentBoxes.length; index++) { if(commentBoxes[index].value != "") { - if(is_chrome) { - return "You sure you want to leave? Your work will be lost."; - } else { - yourWorkWillBeLost(e); - } + return yourWorkWillBeLost(e); } } } @@ -108,7 +107,7 @@
{% for tag in question.tagname_list %} - {% endfor %}
@@ -225,6 +224,7 @@ {% trans "toggle preview" %} + {% if settings.WIKI_ON %} {{ answer.wiki }} @@ -239,10 +239,19 @@ {{ answer.text.errors }} -
+
+ + {% if answer.recaptcha %} +
+ {{ answer.recaptcha.errors }} + {{ answer.recaptcha }} +
+
+ {% endif %} +

- + class="submit" style="float:left" onclick="submitClicked(event, this.form)"/> {% endif %} @@ -263,7 +272,11 @@
{% include "subscription_status.html" %}
+ +{% markdown_help %} + {% sidebar_upper %} + {% cache 60 questions_tags settings.APP_URL question.id %}

@@ -271,8 +284,9 @@

{% for tag in question.tags.all %} - ×{{ tag.used_count|intcomma }}
{% endfor %}