Files
emonev/apps/js/sys/chpasswd.js
T
2026-05-24 15:56:42 +07:00

56 lines
1.8 KiB
JavaScript

/*******************************************************************
Module : /apps/js/sys/chpasswd.js
Desc. : JS - Perubahan Password Operator
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2008.
Last Modified : April 25th, 2020.
(c) 2008 - 2020, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var SYSChpasswdJS = {
PHP: '',
KODE: '',
loading: function(){
$('#butSave').click(function(){this.proses_save();}.bind(this));
FoniaJS.setFocus('#LPass');
},
proses_save: function(){
if ($("#LPass").val()=="") {
FoniaJS.showInfo("Silakan masukkan password lama Anda!");
FoniaJS.setFocus("#LPass");
return false;
} else if ($("#BPass1").val()=="") {
FoniaJS.showInfo("Silakan masukkan password baru 1 Anda!");
FoniaJS.setFocus("#BPass1");
return false;
} else if ($("#BPass2").val()=="") {
FoniaJS.showInfo("Silakan masukkan password baru 2 Anda!");
FoniaJS.setFocus("#BPass2");
return false;
} else if ($("#BPass1").val()!=$("#BPass2").val()) {
FoniaJS.showInfo("Password baru 1 dan 2 Anda tidak sama!");
FoniaJS.setFocus("#BPass1");
return false;
}
new Request.JSON({
url: this.PHP,
sendParam: ['data=chpasswd','LPass','BPass1','BPass2'],
onSuccess: function(ajson){
if (ajson.status == true) {
FoniaJS.showInfo(ajson.msg);
FoniaJS.closeWindow('#win'+this.KODE);
} else {
FoniaJS.showError(ajson.msg);
}
}.bind(this)
}).send();
}
};