From 2c9527bfa5320ec92cb0bef15ab62349b03bc072 Mon Sep 17 00:00:00 2001 From: Scott Bragg Date: Sat, 18 Jun 2016 14:27:47 +1000 Subject: [PATCH] If there are form errors it will now switch to the appropriate tab --- pinaxcon/templates/site_base.html | 2 ++ pinaxcon/templates/symposion/reviews/review_detail.html | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pinaxcon/templates/site_base.html b/pinaxcon/templates/site_base.html index f5511555..cd31b720 100644 --- a/pinaxcon/templates/site_base.html +++ b/pinaxcon/templates/site_base.html @@ -47,8 +47,10 @@ {% block scripts %} {% include "_scripts.html" %} + {% block extra_script %}{% endblock %} {% endblock %} + {% block extra_body_base %} {% analytics %} {% block extra_body %}{% endblock %} diff --git a/pinaxcon/templates/symposion/reviews/review_detail.html b/pinaxcon/templates/symposion/reviews/review_detail.html index 2751a27c..5f5e6754 100644 --- a/pinaxcon/templates/symposion/reviews/review_detail.html +++ b/pinaxcon/templates/symposion/reviews/review_detail.html @@ -94,7 +94,7 @@
{% if review_form %} -
+ {% trans "Submit Review" %}

Enter your vote and any comment to go along with it. You can revise your vote or comment multiple times with an existing vote (your previously recorded score will be replaced during calculations). Your vote and comments are not public and will only be viewable by other reviewers.

{% csrf_token %} @@ -177,11 +177,15 @@ $(".nav-tabs a[href='" + location.hash + "']").click(); }); - $('#.nav-tabs a[data-toggle="tab"]').on('shown', function (e) { + $('.nav-tabs a[data-toggle="tab"]').on('shown', function (e) { if (History.enabled) { History.pushState(null, null, $(e.target).attr("href")); } }); + + if (window.location.hash !== '') { + $('.nav-tabs a[href="' + window.location.hash + '"]').tab('show') + } });