Commit 756d1de4 authored by stef's avatar stef
Browse files

[enh] added confirmation to detailview

parent f1ff683b
......@@ -36,6 +36,11 @@ function bindPostCommentHandler() {
$(document).ready(function() {
bindPostCommentHandler();
$('.confirm_form').submit(function() {
var self=this;
$.ajax({url: '/confirm/'+$(this).attr('id')+'/'+$(this).children('input:first').attr('value'), success: function(data) { $(self).html(data); }});
return false;
});
});
</script>
{% endblock %}
......@@ -72,6 +77,14 @@ $(document).ready(function() {
{%if v.contractual%}<li><dl><dt>{% trans "Contractual restriction" %}</dt><dd>{% trans "yes" %}</dd></dl></li>{%endif%}
{%if v.contract_excerpt%}<li><dl><dt>{% trans "Contract excerpt" %}</dt><dd class='text'>{{v.contract_excerpt|safe}}</dd></dl></li>{%endif%}
</ul>
<div class="info-validate" style="display: inline-block;">
<form method="get" id="{{ violation.pk }}" class="confirm_form" >
<label>{% trans "In order to <strong>validate your action</strong>, please enter your email address" %}</label>
<input type="text" name="email" />
<input type="hidden" value="{{ violation.pk }}" />
<input type="submit" value="{% trans "confirm" %}" />
</form>
</div>
{%endif%}
{% if not key %}
<div id="comments">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment