Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
756d1de4
Commit
756d1de4
authored
Sep 21, 2011
by
stef
Browse files
[enh] added confirmation to detailview
parent
f1ff683b
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/view.html
View file @
756d1de4
...
...
@@ -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"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment