Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
85ac26a6
Commit
85ac26a6
authored
Jan 05, 2016
by
Fabian-Andree Heidemann
Browse files
[password] update password reset to JSON API
parent
533bb6a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
vispa/static/js/password.js
View file @
85ac26a6
...
...
@@ -58,30 +58,30 @@ define([
}
if
(
pass1
!=
pass2
)
{
Dialog
.
alert
(
"
Your passwords don't match!
"
,
{
onClose
:
function
()
{
$
(
"
#password2
"
).
focus
();
}
var
dialog
=
Dialog
.
alert
(
"
Your passwords don't match!
"
);
dialog
.
on
(
"
close
"
,
function
()
{
$
(
"
#password1
"
).
focus
();
});
return
this
;
}
$
.
post
(
this
.
url
.
dynamic
(
"
ajax/setpassword
"
),
{
hash
:
this
.
hash
,
password
:
pass1
})
.
done
(
function
()
{
var
d
=
new
Date
();
d
.
setTime
(
d
.
getTime
()
+
30
e3
);
$
.
cookie
(
"
tmpPass
"
,
pass1
,
{
expires
:
d
});
window
.
location
.
href
=
self
.
url
.
dynamic
(
"
/
"
);
}).
fail
(
function
(
res
)
{
Dialog
.
alert
(
res
.
responseJSON
.
message
,
{
onClose
:
function
()
{
},
function
(
err
,
data
)
{
if
(
err
.
code
!==
200
)
{
var
dialog
=
Dialog
.
alert
(
err
.
message
);
dialog
.
on
(
"
close
"
,
function
()
{
$
(
"
#password1
"
).
focus
();
}
});
});
}
else
{
var
d
=
new
Date
();
d
.
setTime
(
d
.
getTime
()
+
30
e3
);
$
.
cookie
(
"
tmpPass
"
,
pass1
,
{
expires
:
d
});
window
.
location
.
href
=
self
.
url
.
dynamic
(
"
/
"
);
}
});
return
this
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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