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
d1ed046a
Commit
d1ed046a
authored
Sep 21, 2011
by
stef
Browse files
[enh] alcts confirm also on list view
parent
05574d43
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/list.html
View file @
d1ed046a
...
...
@@ -12,22 +12,17 @@
$
(
"
#sortedlist
"
).
tablesorter
();
$
(
'
#sortedlist
'
).
tableFilter
();
$
(
'
.confirm_form
'
).
submit
(
function
()
{
var
self
=
this
;
var
email
=
$
(
this
).
find
(
'
input:first
'
).
attr
(
'
value
'
);
if
(
email
)
{
$
.
ajax
({
url
:
'
/confirm/
'
+
$
(
this
).
attr
(
'
id
'
)
+
'
/
'
+
email
,
success
:
function
(
data
)
{
$
(
self
).
html
(
data
);
}});
}
else
{
$
(
this
).
parent
().
find
(
'
.email-box
'
).
css
(
'
color
'
,
'
red
'
);
};
return
false
;
var
self
=
this
;
$
.
ajax
({
url
:
'
/confirm/
'
+
$
(
this
).
attr
(
'
id
'
)
+
'
/
'
+
$
(
this
).
children
(
'
input:first
'
).
attr
(
'
value
'
),
success
:
function
(
data
)
{
$
(
self
).
find
(
'
.info-validate
'
).
html
(
data
);
}});
return
false
;
});
$
(
"
.confirm > .button
"
).
click
(
function
(){
$
(
this
).
next
().
toggleClass
(
'
hidden
'
);
});
$
(
this
).
parent
().
parent
().
parent
().
find
(
'
.info-validate
'
).
toggle
(
);
});
$
(
"
.cancel-button
"
).
click
(
function
(){
$
(
this
).
parent
().
parent
().
parent
().
parent
().
addClass
(
'
hidden
'
);
});
});
$
(
this
).
parent
().
parent
().
hide
(
);
});
});
</script>
{% endblock %}
...
...
@@ -56,30 +51,24 @@
<tbody>
{% for violation in violations %}
<tr>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.country }}
</a></td>
<td>
<a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.country }}
</a>
<div
class=
"info-validate"
>
<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
"
%}"
/>
<input
class=
"cancel-button"
type=
"button"
value=
"{% trans "
cancel
"
%}"
/>
</form>
</div>
</td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.operator }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.contract }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.resource }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.type }}
</a></td>
<td><a
class=
"cell-link"
href=
"/view/{{violation.pk}}"
>
{{ violation.media }}
</a></td>
<td>
{{ violation.confirmations }}
<div
class=
"confirm"
><a
class=
"button"
>
+1
</a>
<div
class=
"hidden confirm_popup alpha60"
>
<div>
<h3>
{% trans "Confirmation" %}
</h3>
<div>
<small>
{% trans "I attest the existence of this infringement" %}
<br
/>
<a
href=
"/view/{{violation.pk}}"
>
{{ violation.operator }} ({{ violation.country }}) {{ violation.contract }}
</a></small>
<form
method=
"get"
class=
"confirm_form"
id=
"{{ violation.pk }}"
>
<div
class=
"email-box"
>
{% trans "E-mail" %}:
<input
type=
"text"
name=
"email"
/></div>
//{% trans "required" %}
<br
/>
<input
type=
"hidden"
value=
"{{ violation.pk }}"
/>
<input
type=
"submit"
value=
"confirm"
/>
<input
class=
"cancel-button"
type=
"button"
value=
"{% trans "
cancel
"
%}"
/>
</form>
</div>
</div>
</div>
</td>
<td>
{{ violation.confirmations }}
<div
class=
"confirm"
><a
class=
"button"
>
confirm
</a></td>
</tr>
{% endfor %}
</tbody>
...
...
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