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
piks3l
Respect My Net
Commits
659fe59d
Commit
659fe59d
authored
Oct 07, 2011
by
stef
Browse files
[fix] confirmation only submits when email field is set
parent
83002be3
Changes
2
Hide whitespace changes
Inline
Side-by-side
templates/list.html
View file @
659fe59d
...
...
@@ -17,7 +17,13 @@
$
(
'
#sortedlist
'
).
tableFilter
();
$
(
'
.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
);
}});
var
email
=
$
(
this
).
children
(
'
input:first
'
).
attr
(
'
value
'
);
if
(
email
.
length
>
0
)
{
$
.
ajax
({
url
:
'
/confirm/
'
+
$
(
this
).
attr
(
'
id
'
)
+
'
/
'
+
email
,
success
:
function
(
data
)
{
$
(
self
).
html
(
data
);
}});
}
else
{
console
.
log
(
$
(
this
).
find
(
'
[type=submit]
'
));
$
(
this
).
find
(
'
[type=text]
'
).
focus
();
}
return
false
;
});
$
(
"
.confirm > .button
"
).
click
(
function
(){
...
...
templates/view.html
View file @
659fe59d
...
...
@@ -38,7 +38,13 @@ $(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
);
}});
var
email
=
$
(
this
).
children
(
'
input:first
'
).
attr
(
'
value
'
);
if
(
email
.
length
>
0
)
{
$
.
ajax
({
url
:
'
/confirm/
'
+
$
(
this
).
attr
(
'
id
'
)
+
'
/
'
+
email
,
success
:
function
(
data
)
{
$
(
self
).
html
(
data
);
}});
}
else
{
console
.
log
(
$
(
this
).
find
(
'
[type=submit]
'
));
$
(
this
).
find
(
'
[type=text]
'
).
focus
();
}
return
false
;
});
});
...
...
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