mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
22fb95d7bd
@ -559,6 +559,10 @@ panel.changePassword = function(){
|
|||||||
<label class="label">New password:</label>
|
<label class="label">New password:</label>
|
||||||
<p class="control has-addons">
|
<p class="control has-addons">
|
||||||
<input id="password" class="input is-expanded" type="password" placeholder="Your new password">
|
<input id="password" class="input is-expanded" type="password" placeholder="Your new password">
|
||||||
|
</p>
|
||||||
|
<label class="label">Confirm password:</label>
|
||||||
|
<p class="control has-addons">
|
||||||
|
<input id="passwordConfirm" class="input is-expanded" type="password" placeholder="Verify your new password">
|
||||||
<a id="sendChangePassword" class="button is-primary">Set new password</a>
|
<a id="sendChangePassword" class="button is-primary">Set new password</a>
|
||||||
</p>
|
</p>
|
||||||
`;
|
`;
|
||||||
@ -566,9 +570,18 @@ panel.changePassword = function(){
|
|||||||
panel.page.appendChild(container);
|
panel.page.appendChild(container);
|
||||||
|
|
||||||
document.getElementById('sendChangePassword').addEventListener('click', function(){
|
document.getElementById('sendChangePassword').addEventListener('click', function(){
|
||||||
panel.sendNewPassword(document.getElementById('password').value);
|
if (document.getElementById('password').value === document.getElementById('passwordConfirm').value) {
|
||||||
|
panel.sendNewPassword(document.getElementById('password').value);
|
||||||
|
} else {
|
||||||
|
swal({
|
||||||
|
title: "Password mismatch!",
|
||||||
|
text: 'Your passwords do not match, please try again.',
|
||||||
|
type: "error"
|
||||||
|
}, function() {
|
||||||
|
panel.changePassword();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
panel.sendNewPassword = function(pass){
|
panel.sendNewPassword = function(pass){
|
||||||
|
Loading…
Reference in New Issue
Block a user