diff options
Diffstat (limited to 'design/templates/comments/posted.html')
-rw-r--r-- | design/templates/comments/posted.html | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/design/templates/comments/posted.html b/design/templates/comments/posted.html index e13288d..f4aee46 100644 --- a/design/templates/comments/posted.html +++ b/design/templates/comments/posted.html @@ -1,25 +1,31 @@ -{% extends "comments/base.html" %}{% load i18n %} +{% extends "base.html" %} +{% load i18n %} +{% block js %} +<script type="text/javascript"> -{% block title %}{% trans "Thanks for commenting" %}{% endblock %} +(function () { + var timeLeft = 5, + cinterval; -{% block extrahead %} -{{ block.super }} - <meta http-equiv="Refresh" content="5; url={{ comment.content_object.get_absolute_url }}#c{{ comment.id }}" /> -{% endblock %} - -{% block content %} - <h2>{% trans "Thanks for posting your comment" %}</h2> - <p> - {% blocktrans %} - We have received your comment, and posted it on the web site.<br/> - You will be sent back to the article... - {% endblocktrans %} - </p> + var timeDec = function (){ + timeLeft--; + document.getElementById('countdown').innerHTML = timeLeft; + if(timeLeft === 0){ + clearInterval(cinterval); + window.location="{{comment.content_object.get_absolute_url}}"; + } + }; - {# Use identical formatting to normal comment list #} - <div id="comments"> - {% include "comments/comment.html" %} - </div> + cinterval = setInterval(timeDec, 1000); +})(); - <p><a href="{{ comment.content_object.get_absolute_url }}#c{{ comment.id }}">{% trans "Back to the article" %}</a></p> +</script> +{% endblock %} +{% block primary %} +<main role="main"> + <h1>Thank you for your comment</h1> + <p>Unless you've previously been approved a few times, your comment will be moderated. If we're on the road this can sometimes take a few days, so please be patient.</p> + <p><a href="{{comment.content_object.get_absolute_url}}">Return to the page you came from</a> Redirecting in <span id="countdown">5</span></p> + + </main> {% endblock %} |