| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/wamp/www/sipapbd_2019_perubahan/application/modules/setting/views/ |
Upload File : |
<fieldset>
<legend>Pengaturan KUA PPAS</legend>
</fieldset>
<form id="frm" autocomplete="off" action="<?php echo base_url();?>setting/kuappas/proses" class="form-horizontal">
<fieldset class="fieldsetx" >
<legend class="legendx" >Mode Penguncian</legend>
<div >
<label class="radio">
<input type="radio" data-bind="checked: mode" value="2" title="Pagu yang dibuat harus sama dengan KUA PPA" />Penguncian maksimal
</label>
<label class="radio">
<input type="radio" data-bind="checked: mode" value="1" title="Pagu yang dibuat bisa kurang atau sama dengan KUA PPA" />Penguncian fleksibel
</label>
<label class="radio">
<input type="radio" data-bind="checked: mode" value="0" title="Pagu bisa dibuat tanpa batasan KUA PPA" />Tanpa penguncian
</label>
</div>
</fieldset>
<fieldset class="fieldsetx" >
<legend class="legendx" >Level KUA PPAS Belanja Langsung</legend>
<div >
<label class="radio">
<input type="radio" data-bind="checked: level" value="1" />Sampai dengan Kegiatan
</label>
<label class="radio">
<input type="radio" data-bind="checked: level" value="0" />Sampai dengan Jenis Rekening
</label>
</div>
</fieldset>
<div class="bottom-bar">
<button type="button" class="btn btn-primary" data-bind="enable: !processing(), click: save" />Simpan</button>
</div>
</form>
<script type="text/javascript">
$(document).ready(function() {
});
ko.validation.init({
insertMessages: false,
decorateElement: true,
errorElementClass: 'error',
});
var ModelSetting = function() {
var self = this;
self.processing = ko.observable(false);
self.mode = ko.observable('<?php echo isset($conf['KUA_PPA']) ? $conf['KUA_PPA'] : '0';?>');
self.level = ko.observable(<?php echo isset($conf['KUA_PPA_221']) ? $conf['KUA_PPA_221'] : '0';?>);
self.errors = ko.validation.group(self);
}
var App = new ModelSetting();
App.formValidation = function(){
var errmsg = [];
if (!App.isValid()){
errmsg.push('Ada kolom yang belum diisi dengan benar. Silakan diperbaiki.');
App.errors.showAllMessages();
}
if (errmsg.length > 0) {
message = errmsg.join('</br>');
show_warning(message);
return false;
}
return true;
}
App.save = function(){
if (!App.formValidation()){ return }
var $frm = $('#frm'),
data = JSON.parse(ko.toJSON(App));
App.processing(true);
$.ajax({
url: $frm.attr('action'),
type: 'post',
dataType: 'json',
data: data,
success: function(res, xhr){
if (res.isSuccess) show_info(res.message, 'Sukses');
else show_error(res.message, 'Gagal');
},
complete: function(){
App.processing(false);
}
});
}
ko.applyBindings(App);
</script>