Upgrades from IceHrm Pro v24
This commit is contained in:
@@ -85,11 +85,11 @@ UserAdapter.method('save', function() {
|
||||
var msg = this.doCustomValidation(params);
|
||||
if(msg == null){
|
||||
var id = $('#'+this.getTableName()+"_submit #id").val();
|
||||
params['csrf'] = $('#'+this.getTableName()+'Form').data('csrf');
|
||||
if(id != null && id != undefined && id != ""){
|
||||
$(params).attr('id',id);
|
||||
params['id'] = id;
|
||||
this.add(params,[]);
|
||||
}else{
|
||||
|
||||
var reqJson = JSON.stringify(params);
|
||||
|
||||
var callBackData = [];
|
||||
@@ -105,9 +105,6 @@ UserAdapter.method('save', function() {
|
||||
//$("#"+this.getTableName()+'Form .label').show();
|
||||
this.showMessage("Error Saving User",msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -116,14 +113,13 @@ UserAdapter.method('changePasswordConfirm', function() {
|
||||
$('#adminUsersChangePwd_error').hide();
|
||||
|
||||
var passwordValidation = function (str) {
|
||||
var val = /^[a-zA-Z0-9]\w{6,}$/;
|
||||
return str != null && val.test(str);
|
||||
return str.length > 7;
|
||||
};
|
||||
|
||||
var password = $('#adminUsersChangePwd #newpwd').val();
|
||||
|
||||
if(!passwordValidation(password)){
|
||||
$('#adminUsersChangePwd_error').html("Password may contain only letters, numbers and should be longer than 6 characters");
|
||||
$('#adminUsersChangePwd_error').html("Password should be longer than 7 characters");
|
||||
$('#adminUsersChangePwd_error').show();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user