Files
siaupheng aaaf0a9215 Refactor member and product scripts to use concise method definitions
- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
2026-11-01 14:57:54 +07:00

56 lines
1.7 KiB
JavaScript

/*******************************************************************
PHP Class : /Controller/System/ChpasswdController
Description : Data Ubah Password
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2008.
Last Modified : August 9th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var SYSChpasswdJS = {
PHP: '',
KODE: '',
index() {
$('#butSave').click(() => this.proses_save());
FoniaJS.setFocus('#LPass');
},
proses_save() {
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({
url: this.PHP + '/simpan',
sendParam: ['LPass','BPass1'],
onSuccess: (ajson) => {
if (ajson.status == true) {
FoniaJS.showInfo(ajson.message);
FoniaJS.closeWindow('#win'+this.KODE);
} else {
FoniaJS.showError(ajson.message);
}
}
}).send();
}
};