当前位置: 首页>>代码示例>>PHP>>正文


PHP Chtml::ajaxSubmitButton方法代码示例

本文整理汇总了PHP中Chtml::ajaxSubmitButton方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::ajaxSubmitButton方法的具体用法?PHP Chtml::ajaxSubmitButton怎么用?PHP Chtml::ajaxSubmitButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Chtml的用法示例。


在下文中一共展示了Chtml::ajaxSubmitButton方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 
            <?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>
开发者ID:OlviLora,项目名称:PHPKeren,代码行数:29,代码来源:__deadLineForm.php

示例2: StatusForm

            <?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>
开发者ID:OlviLora,项目名称:PHPKeren,代码行数:31,代码来源:__statusForm.php

示例3: array

?>
            <?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 
开发者ID:alexanderkuz,项目名称:test-yii2,代码行数:31,代码来源:add.php

示例4: array

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'));*/
开发者ID:qhyabdoel,项目名称:hris_mujigae,代码行数:31,代码来源:_form.php

示例5: array

            <?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>
开发者ID:alexanderkuz,项目名称:test-yii2,代码行数:31,代码来源:add.php


注:本文中的Chtml::ajaxSubmitButton方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。