<?php echo $form->error($deadlineForm, 'tgl_deadline'); ?> </div> <div class="row buttons"> <?php //echo Chtml::ajaxSubmitButton('Add Deadline', array("reloadDeadlineForm"), array('update' => '#deadline_form'), array('id' => 'ajax')); echo Chtml::ajaxSubmitButton('Add Deadline', array("saveDeadline&id=" . DeadlineForm::$currentAgenda_id), array('update' => '#deadline_form', 'success' => 'function() {' . 'var penanggungJawab = $("#penanggungJawab").val(); var deadline = $("#deadline").val(); var tanggalDeadline = $("#tanggalDeadline").val(); var text = "Penanggungjawab : " + penanggungJawab + "\\n"; text += "Deadline : " + deadline + "\\n"; text += "Tanggal : " + tanggalDeadline + "\\n"; before = $("#nextTarget").html(); if (before) { text = before + "\\n" + text; } $("#nextTarget").html(text);' . 'alert("data terkirim");' . '}')); ?> </div> <?php $this->endWidget(); ?> </div><!-- form --> </div>
<?php $statusForm = new StatusForm(); //echo $currentAgenda->topik.' '.$currentAgenda->id; $form = $this->beginWidget('CActiveForm', array('id' => 'statusForm', 'enableAjaxValidation' => false)); ?> <div class="row"> <?php echo $form->labelEx($statusForm, 'status'); ?> <?php echo $form->dropDownList($statusForm, 'status', $this->getAgendaStatus(), $currentAgenda->status != 'NEW' ? array('options' => array($currentAgenda->status => array('selected' => true))) : array('empty' => '-Pilih-')); ?> <?php echo $form->error($statusForm, 'status'); ?> </div> <div class="row buttons"> <?php echo Chtml::ajaxSubmitButton('Give Status', array("saveAgenda&id={$currentAgenda->id}"), array('update' => '#agenda_menu', 'success' => 'function() {' . 'alert("status agenda telah di-update, silahkan refresh halaman");' . '}')); //echo Chtml::ajaxSubmitButton('Give Status', "saveAgenda&id=$currentAgenda->id&idRapat=$rapat->id"); ?> </div> <?php $this->endWidget(); ?> </div> </div> </div>
?> <?php $label = $Custom->isNewRecord ? Yii::t('CustomsModule.default', 'Добавить') : Yii::t('CustomsModule.default', 'Сохранить'); ?> <?php echo Chtml::ajaxSubmitButton($label, '', array('dataType' => 'json', 'type' => 'post', 'beforeSend' => 'function(data){ yaCounter35068425.reachGoal("Custom Request"); $(".form-loader").show(); }', 'error' => "function(data) {\n document.location = '/erroradd/'+data.status;\n }", 'success' => 'function(data) { if(data.status == "500") { document.location = data.redirect; } else { $(".form-loader").hide(); $("#custom-from_es_ ul").empty(); $(".form-group").removeClass("has-error"); $(".help-block.error").empty().hide(); $("#custom-from_es_").show(); $.each(data, function(key, val) { $("#custom-from_es_ ul").append("<li>"+val+"</li>"); $("#custom-from #"+key+"_em_").parent(".form-group").addClass("has-error"); $("#custom-from #"+key+"_em_").text(val); $("#custom-from #"+key+"_em_").show(); }); ga("send", "event", "Заявка на таможню", "Добавить"); } }'), array('type' => 'submit', 'name' => 'save', 'class' => 'save btn btn-default')); ?> </section> </div> </div> <?php
echo CHtml::activeLabelEx($model, 'year', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeDropDownList($model, 'year', $years, array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select')); ?> <?php echo CHtml::error($model, 'year'); ?> </div> </div> <div class="form-group"> <div class="col-md-6 col-xs-12"> <?php echo Chtml::ajaxSubmitButton(at('Generate'), Yii::app()->createUrl('attendance/schedulle/smcalendar'), array('update' => '#smcalendar')); ?> </div> </div> </div> <div id="smcalendar"> <?php $this->renderPartial('smcalendar', array('model' => $model, 'employees' => $employees, 'daysValue' => $daysValue, 'holidays' => $holidays)); ?> </div> <div class="panel-footer"> <?php /*echo CHtml::button('Clear Form', array('class'=>'btn btn-default'));*/
<?php $label = $SpecialTechnique->isNewRecord ? Yii::t('MarketModule.default', 'Добавить') : Yii::t('MarketModule.default', 'Сохранить'); ?> <?php echo Chtml::ajaxSubmitButton($label, '', array('dataType' => 'json', 'type' => 'post', 'beforeSend' => 'function(data){ yaCounter35068425.reachGoal(yandexMachineryGoal); $(".form-loader").show(); }', 'error' => "function(data) {\n// console.log(data);\n// document.location = '/erroradd/'+data.status;\n }", 'success' => 'function(data) { console.log(data); if(data.status == "500") { document.location = data.redirect; } else { $(".form-loader").hide(); $("#car-market_es_ ul").empty(); $(".form-group").removeClass("has-error"); $(".help-block.error").empty().hide(); $("#car-market_es_").show(); $.each(data, function(key, val) { $("#car-market_es_ ul").append("<li>"+val+"</li>"); $("#car-market #"+key+"_em_").parent(".form-group").addClass("has-error"); $("#car-market #"+key+"_em_").text(val); $("#car-market #"+key+"_em_").show(); }); ga( googleMachineryGoal.s, googleMachineryGoal.e, googleMachineryGoal.t, googleMachineryGoal.h); } }'), array('type' => 'submit', 'name' => 'save', 'class' => 'save btn btn-default')); ?> </section> </div> </div> </div>