function set_npm(){ Ext.Ajax.request({ url: BASE_URL + 'main/get_setting_js', method: 'POST', params: { kode:'NPM' }, //scope: this, async:false, success: function(response) { var npm1 = Ext.getCmp('frm.npm'); var npm2 = Ext.getCmp('tf.npm-mhs'); npm1.label.update(response.responseText); npm2.label.update(response.responseText); }, failure: function() { Ext.MessageBox.alert("Informasi", "Setting Failure"); } }); } function sett_oto_npm() { Ext.Ajax.request({ url: BASE_URL + 'main/get_setting_js', method: 'POST', params: { kode:'GNPM' }, //scope: this, async:false, success: function(response) { val = response.responseText; if (val=='0') { Ext.getCmp('tf.npm-mhs').enable(); Ext.getCmp('tf.npm-mhs').setReadOnly(false); Ext.getCmp('tf.npm-mhs').allowBlank=false; //Ext.getCmp('tf.npm-mhs').emptyText=""; Ext.getCmp('tf.npm-mhs').setValue(""); Ext.getCmp('tf.npm-mhs').applyEmptyText(); } else { Ext.getCmp('tf.npm-mhs').disable(); Ext.getCmp('tf.npm-mhs').setReadOnly(true); //Ext.getCmp('tf.npm-mhs').emptyText="Auto-Generate"; Ext.getCmp('tf.npm-mhs').setValue("Auto-Generate"); Ext.getCmp('tf.npm-mhs').applyEmptyText(); Ext.getCmp('oto').setValue('Auto-Generate'); } }, failure: function() { Ext.MessageBox.alert("Informasi", "Setting Failure"); } }); } function sett_oto_nidu() { Ext.Ajax.request({ url: BASE_URL + 'main/get_setting_js', method: 'POST', params: { kode:'GNIDU' }, //scope: this, async:false, success: function(response) { val = response.responseText; if (val=='0') { Ext.getCmp('tf.nidu-dos').enable(); Ext.getCmp('tf.nidu-dos').setReadOnly(false); Ext.getCmp('tf.nidu-dos').allowBlank=false; //Ext.getCmp('tf.nidu-dos').emptyText=""; Ext.getCmp('tf.nidu-dos').setValue(""); Ext.getCmp('tf.nidu-dos').applyEmptyText(); } else { Ext.getCmp('tf.nidu-dos').disable(); Ext.getCmp('tf.nidu-dos').setReadOnly(true); //Ext.getCmp('tf.nidu-dos').emptyText="Auto-Generate"; Ext.getCmp('tf.nidu-dos').setValue("Auto-Generate"); Ext.getCmp('tf.nidu-dos').applyEmptyText(); Ext.getCmp('oto1').setValue('Auto-Generate'); } }, failure: function() { Ext.MessageBox.alert("Informasi", "Setting Failure"); } }); }