[gen] Implemented a mechanism 'forgot password?'.

This commit is contained in:
Gaetan Delannay 2012-07-09 15:47:38 +02:00
parent 8a5ca81746
commit ad14c1258c
6 changed files with 139 additions and 17 deletions

View file

@ -451,6 +451,19 @@ function doConfirm() {
}
}
var wrongTextInput = '#ff934a none';
// Function triggered when the user ask password reinitialisation
function doAskPasswordReinit() {
// Check that the user has typed a login
var theForm = document.getElementById('askPasswordReinitForm');
var login = theForm.login.value.replace(' ', '');
if (!login) { theForm.login.style.background = wrongTextInput; }
else {
closePopup('askPasswordReinitPopup');
theForm.submit();
}
}
// Function that finally posts the edit form after the user has confirmed that
// she really wants to post it.
function postConfirmedEditForm() {