/******************************************************************* PHP Class : /Controller/System/ConfigController Description : Konfigurasi Informasi Perusahaan Created By : Siau Pheng (siaupheng@3fonia.com). Created Date : May 25th, 2010. Last Modified : August 14th, 2026. (c) 3FONIA Software; WWW.3FONIA.COM. *******************************************************************/ var ConfigJS = { PHP: '', KODE: '', index() { $('#butUbah').click(() => this.proses_edit()); $('#butSimpan').click(() => this.proses_save()); this.data_query('view'); }, proses_edit() { this.data_query('edit'); }, proses_save() { new Request({ url: this.PHP + '/config', sendParam: ['mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_EMAIL','REG_OWNER','REG_NPWP'], onSuccess: (ajson) => { $('#divMaster').html(ajson.html); this.update_event(); } }).send() }, data_query(mode) { new Request({ url: this.PHP + '/config', sendParam: ['mode='+mode], onSuccess: (ajson) => { $('#divMaster').html(ajson.html); this.update_event(); } }).send() }, update_event() { if ($.inArray($('#mode').val(), ['edit']) !== -1) { $("#butUbah").prop('disabled', true); $("#butSimpan").prop('disabled', false); } else { $("#butUbah").prop('disabled', false); $("#butSimpan").prop('disabled', true); } } };