Check login inputs

This commit is contained in:
Pierre
2017-02-24 10:48:21 +01:00
parent 07c57e965e
commit 92413b3667
6 changed files with 157 additions and 6 deletions

View File

@ -61,8 +61,24 @@ ComunicWeb.pages.login = {
* @return {Boolean} False if it fails
*/
loginSubmit: function(){
alert("Login");
//var overlay = ComunicWeb.common.page.showTransparentWaitSplashScreen();
//Get inputs
var usermail = document.getElementById("usermail"); //Usermail
var userpassword = document.getElementById("userpassword"); //Password
var rememberLogin = document.getElementById("rememberLogin"); //Remember login
//Check inputs
if(!(
ComunicWeb.common.formChecker.checkInput(usermail, true) && //Check usermail input
ComunicWeb.common.formChecker.checkInput(userpassword, true) //Check password input
)){
//Error notification
ComunicWeb.common.notificationSystem.showNotification("Please check what you've typed !", "error");
//Stop function execution
return false;
}
var overlay = ComunicWeb.common.page.showTransparentWaitSplashScreen();
},
};