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


PHP ActiveForm::end方法代码示例

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


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

示例1:

			<?= $form->field($model, 'head_picture')->label(Yii::t('app', 'Upload Head Picture'))->widget(FileInput::classname(), [
		    'pluginOptions' => [
		        'uploadUrl' => Url::to(['/user/upload-head-pic']),
		        'uploadAsync' => false,
		        'allowedPreviewTypes' => ['image'],
		        'allowedFileExtensions' => ['png', 'jpg', 'jpeg'],
		        'maxFileCount' => 1,
		        'maxFileSize' => 1000,
		        'uploadExtraData' => [
		            '_csrf' => Yii::$app->request->csrfToken,
		            'User[id]' => $model->id,
		        ] 
		    ]
	   		]); ?>

	   	<?php ActiveForm::end(); ?>
   	</div>

   	<div class="col-lg-2 col-lg-offset-5 col-md-2 col-md-offset-5 col-sm-2 col-sm-offset-2 profile-save">
   		<button class="btn btn-info" onclick="profileSave()" id="profile-save-btn"><span class="fa fa-spinner fa-pulse" style="display:none"></span>保存</button>
   	</div>
		
		
	</div>

<!-- 	<div class="mengceng">
		<span class="fa fa-refresh fa-spin fa-3x gif"></span>
	</div> -->

	<script type="text/javascript">
开发者ID:songwanfu,项目名称:SummerNut,代码行数:30,代码来源:updateProfile.php

示例2:

            <?php 
echo Html::submitButton(Yii::t('setup', 'Test connection'), ['class' => 'btn btn-default pull-left', 'name' => 'test']);
?>
            <?php 
if ($connectionOk) {
    ?>
                <?php 
    echo Html::submitButton(Yii::t('setup', 'Save and continue'), ['class' => 'btn btn-primary pull-right', 'name' => 'save']);
    ?>
            <?php 
}
?>
        </div>

        <?php 
ActiveForm::end();
?>
    </div>
</div>

<?php 
$advancedOptions = Yii::t('setup', 'Advanced options');
$js = <<<JS
    \$(document).ready(function(){

        \$("#advancedOptions").hide();
        \$('#toogleAdvancedOptions').click(function( e ){
            e.preventDefault(); // If you use anchors
            var SH = this.SH^=1; // "Simple toggler"
            \$(this).html(SH?'&#9660; {$advancedOptions}':'&#9654; {$advancedOptions}')
                   .css({backgroundPosition:'0 '+ (SH?-18:0) +'px'})
开发者ID:ramialcheikh,项目名称:quickforms,代码行数:31,代码来源:3.php

示例3: loading

    <?php 
if (!Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin) {
    ?>
    <div class="row">
        <?php 
    $form = \kartik\form\ActiveForm::begin(['type' => 'inline']);
    echo $form->field($model, 'airline')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'flightnumber')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'gate')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'aircraft')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'icaofrom')->textInput(['style' => 'width: 100px;', 'readonly' => !$model->isarrival]);
    echo $form->field($model, 'icaoto')->textInput(['style' => 'width: 100px;', 'readonly' => $model->isarrival == 1]);
    echo $form->field($model, 'timefrom')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]);
    echo $form->field($model, 'timeto')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]);
    echo \yii\bootstrap\Html::submitButton('<i class="fa fa-check"></i>Add', ['class' => 'btn btn-success btn-sm']);
    \kartik\form\ActiveForm::end();
    ?>
        <hr />
        <form method="post" class="form-horizontal" enctype="multipart/form-data">
            <div class="form-group field-batch-loading">
                <input id="form-token" type="hidden" name="<?php 
    echo Yii::$app->request->csrfParam;
    ?>
"
                       value="<?php 
    echo Yii::$app->request->csrfToken;
    ?>
"/>
                <label class="control-label" for="batch-loading">Batch loading(<?php 
    echo \yii\helpers\Html::a("XLSX", \yii\helpers\Url::to(['/booking/export-' . strtolower($act), 'id' => $model->airport_id]));
    ?>
开发者ID:bth2008,项目名称:rferu,代码行数:31,代码来源:arrivals.php

示例4: run

    /**
     * @inheritdoc
     */
    public function run()
    {
        if (empty($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        if (!isset($this->formOptions['type'])) {
            $this->formOptions['type'] = ActiveForm::TYPE_VERTICAL;
        }
        if (!isset($this->formOptions['fieldConfig'])) {
            $this->formOptions['fieldConfig'] = ['autoPlaceholder' => true];
        }
        if (!isset($this->template)) {
            $this->template = "<legend>{$this->title}</legend>\n{fields}\n{footer}";
        }
        if (!isset($this->footerTemplate)) {
            $this->footerTemplate = <<<HTML
<div class="row">
    <div class="col-sm-6 text-left">
        {left}
    </div>
    <div class="col-sm-6 text-right">
        {right}
    </div>
</div>
HTML;
        }
        $this->_form = ActiveForm::begin($this->formOptions);
        $options = ['model' => $this->model, 'form' => $this->_form, 'attributes' => $this->attributes] + $this->options;
        echo strtr($this->template, ['{fields}' => Form::widget($options), '{footer}' => $this->renderFooter()]);
        ActiveForm::end();
    }
开发者ID:communityii,项目名称:yii2-user,代码行数:34,代码来源:BaseForm.php


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