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


PHP Html::resetButton方法代码示例

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


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

示例1: run

 public function run()
 {
     parent::run();
     $model = new \app\models\ProjectSimpleForm();
     $form = ActiveForm::begin(['id' => 'project-simple-form', 'action' => ['/project/simplecreate'], 'layout' => 'inline', 'validateOnChange' => false, 'validateOnBlur' => false]);
     echo $form->field($model, 'title')->textInput(['maxlength' => 255, 'class' => 'form-control input-sm'])->label(false);
     echo '<div class="form-group">' . Html::submitButton(Yii::t('app', 'Create'), ['class' => 'btn btn-sm btn-success', 'style' => 'margin: 5px 5px 5px 0;']) . Html::resetButton(Yii::t('app', 'Cancel'), ['class' => 'btn btn-xs', 'style' => 'margin: 5px;']) . '</div>';
     ActiveForm::end();
     $this->registerJs();
 }
开发者ID:sizeg,项目名称:yii2-todo,代码行数:10,代码来源:SidebarProjectFormWidget.php

示例2: getActions

 /**
  * Get the actions supported for replying
  */
 public function getActions($hidden = false)
 {
     $ret_val = '';
     foreach ($this->_actions as $type => $action) {
         switch ($type) {
             case 'reset':
                 $ret_val .= Html::resetButton(Html::tag($action['tag'], $action['text'], $action['tagOptions']), $action['options']);
                 break;
             case 'submit':
                 $ret_val .= Html::submitButton(Html::tag($action['tag'], $action['text'], $action['tagOptions']), $action['options']);
                 break;
         }
     }
     return Html::tag('div', $ret_val, ['role' => 'replyActions', 'class' => 'text-right ' . ($hidden == true ? 'hidden' : '')]);
 }
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:18,代码来源:ChatForm.php

示例3: getActions

 /**
  * Get the actions supported for replying
  */
 public function getActions($hidden = false)
 {
     $ret_val = '';
     $actions = array_merge($this->defaultActions(), $this->actions);
     foreach ($actions as $type => $action) {
         switch ($type) {
             case 'submit':
                 $ret_val .= Html::submitButton(Html::tag($action['tag'], $action['text'], $action['tagOptions']), $action['options']);
                 break;
             case 'reset':
                 $ret_val .= Html::resetButton(Html::tag($action['tag'], $action['text'], $action['tagOptions']), $action['options']);
                 break;
         }
     }
     return Html::tag('div', Html::tag('div', $ret_val, ['class' => 'btn-group']), ['role' => 'replyActions', 'class' => 'form-group pull-right' . ($hidden == true ? ' hidden ' : ''), "style" => "padding-right: 15px"]);
 }
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:19,代码来源:RepliesForm.php

示例4: function

    echo $form->field($model, 'appilcant_id')->hiddenInput(['maxlength' => true])->label(false);
}
?>
    <?php 
//$form->field($model, 'appilcant_id')->textInput(['maxlength' => true, 'value' => $id])->label(false)
?>

    <div class="row">
        <div class="col-md-6 col-xs-6">
            <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> เพิ่มข้อมูล' : 'อัพเดทข้อมูล', ['class' => ($model->isNewRecord ? 'btn btn-success' : 'btn btn-primary') . ' btn-lg btn-block']);
?>
        </div> 
        <div class="col-md-6 col-xs-6">
            <?php 
echo Html::resetButton($model->isNewRecord ? '<i class="glyphicon glyphicon-refresh"></i> เคลียร์ข้อมูล' : 'คืนค่าเดิม', ['class' => ($model->isNewRecord ? 'btn btn-danger' : 'btn btn-warning') . ' btn-lg btn-block']);
?>
        </div> 
    </div>
</div>
<?php 
ActiveForm::end();
$script = <<<JS

\$('form#xxx').on('afterSubmit', function(e) 
{
   var \$form = \$(this);
    \$.post(
        \$form.attr("action"), // serialize Yii2 form
        \$form.serialize()
    )
开发者ID:aekkapun,项目名称:dlt-tcplch,代码行数:31,代码来源:_form.php

示例5: Date

<?php

use yii\helpers\Html;
use app\models\hrd\Corp;
use app\models\hrd\Dept;
use app\models\hrd\Jabatan;
use app\models\hrd\Status;
use app\models\hrd\Employe;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\builder\FormGrid;
use kartik\widgets\FileInput;
use yii\helpers\ArrayHelper;
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
//$form = ActiveForm::begin(['type'=>ActiveForm::TYPE_VERTICAL]);
$nlDigit = Employe::find()->count() + 1;
$nl = 'LG' . $nlDigit;
echo FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['contentBefore' => '<legend class="text-info"><small>EMPLOYE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Employee.ID', 'columns' => 5, 'attributes' => ['EMP_ID' => ['type' => Form::INPUT_TEXT, 'Form::SIZE_LARGE', 'options' => ['value' => $nl], 'columnOptions' => ['colspan' => 3]], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 4]], 'EMP_NM_BLK' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 4]]]]]], ['contentBefore' => '<legend class="text-info"><small>CORPORATE IDENTITY</small></legend>', 'columns' => 2, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Company', 'columns' => 2, 'attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'columnOptions' => ['colspan' => 1]], 'DEP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_ID', 'DEP_NM'), 'hint' => 'Select Department', 'columnOptions' => ['colspan' => 1]], 'JAB_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Jabatan::find()->orderBy('SORT')->asArray()->all(), 'JAB_ID', 'JAB_NM'), 'hint' => 'Select	Position ', 'columnOptions' => ['colspan' => 1]], 'EMP_STS' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_ID', 'STS_NM'), 'hint' => 'Select Employee Status', 'columnOptions' => ['colspan' => 1]], 'EMP_JOIN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter Join Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 1]], 'EMP_RESIGN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter Resign Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE PROFILE</small></legend>', 'columns' => 3, 'autoGenerateColumns' => false, 'attributes' => ['address_detail' => ['label' => 'Address', 'columns' => 6, 'attributes' => ['EMP_KTP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter NO KTP...'], 'columnOptions' => ['colspan' => 2]], 'EMP_ALAMAT' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter address...'], 'columnOptions' => ['colspan' => 6]], 'EMP_ZIP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Zip...'], 'columnOptions' => ['colspan' => 1]], 'EMP_HP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Phone...'], 'columnOptions' => ['colspan' => 2]], 'EMP_GENDER' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['Male' => 'Male', 'Female' => 'Female'], 'options' => ['inline' => 'Male'], 'columnOptions' => ['colspan' => 4]], 'EMP_TGL_LAHIR' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]], 'hint' => 'Enter birthday  (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 3]], 'EMP_EMAIL' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'acount@domain.com...', 'addon' => ['prepend' => ['content' => '@']]], 'columnOptions' => ['colspan' => 3]]]]]], ['columns' => 3, 'attributes' => ['address_detail' => ['label' => 'Picture', 'columns' => 6, 'attributes' => ['EMP_IMG' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\FileInput', 'columnOptions' => ['colspan' => 2]]]]]], ['attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
ActiveForm::end();
开发者ID:ptrnov,项目名称:WND-W,代码行数:19,代码来源:_form_view.php

示例6:

        'action' => ['index'],
        'method' => 'get',
    ]); ?>

    <?= $form->field($model, 'id') ?>

    <?= $form->field($model, 'name') ?>

    <?= $form->field($model, 'product_group_id') ?>

    <?= $form->field($model, 'code') ?>

    <?= $form->field($model, 'detail') ?>

    <?php // echo $form->field($model, 'created_time') ?>

    <?php // echo $form->field($model, 'last_update') ?>

    <?php // echo $form->field($model, 'user_id') ?>

    <?php // echo $form->field($model, 'product_unit_id') ?>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
    </div>

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

</div>
开发者ID:adsavin,项目名称:car,代码行数:30,代码来源:_search.php

示例7:

                <?php 
echo $form->field($model, 'sortOrder');
?>

                <?php 
echo $form->field($model, 'title');
?>

                <?php 
echo $form->field($model, 'body');
?>

                <div class="form-group">
                    <?php 
echo Html::submitButton(Yii::t('backend/slide', 'Search'), ['class' => 'btn btn-primary']);
?>
                    <?php 
echo Html::resetButton(Yii::t('backend/slide', 'Reset'), ['class' => 'btn btn-default']);
?>
                </div>

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

            </div>
        </div>
    </div>
</div>
开发者ID:cyanofresh,项目名称:yii2shop,代码行数:29,代码来源:_search.php

示例8:

    <?php 
// echo $form->field($model, 'contact_person')
?>

    <?php 
// echo $form->field($model, 'industry')
?>

    <?php 
// echo $form->field($model, 'size')
?>

    <?php 
// echo $form->field($model, 'description')
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('model', 'Search'), ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton(Yii::t('model', 'Reset'), ['class' => 'btn btn-default']);
?>
    </div>

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

</div>
开发者ID:allenaware,项目名称:upload,代码行数:30,代码来源:_search.php

示例9:

$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

    <!-- <?php 
echo $form->field($model, 'idRebanho');
?>
 -->

    <?php 
echo $form->field($model, 'designacao');
?>

    <?php 
echo $form->field($model, 'idNucleo');
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Pesquisar', ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton('Limpar', ['class' => 'btn btn-default']);
?>
    </div>

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

</div>
开发者ID:AnaSousa25,项目名称:TcV,代码行数:30,代码来源:_search.php

示例10:

    <?php // echo $form->field($model, 'p2CroquisUbicacion') ?>

    <?php // echo $form->field($model, 'p2Pago') ?>

    <?php // echo $form->field($model, 'p2Alineamiento') ?>

    <?php // echo $form->field($model, 'p2PropuestaRelotificacion') ?>

    <?php // echo $form->field($model, 'p3Escrituras') ?>

    <?php // echo $form->field($model, 'p3ReciboDerechos') ?>

    <?php // echo $form->field($model, 'p3CroquisUbicacion') ?>

    <?php // echo $form->field($model, 'p3Pago') ?>

    <?php // echo $form->field($model, 'p3Alineamiento') ?>

    <?php // echo $form->field($model, 'p3PropuestaRelotificacion') ?>

    <?php // echo $form->field($model, 'p4Imprimir') ?>

    <div class="form-group">
        <?= Html::submitButton('Buscar', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('Reemplazar', ['class' => 'btn btn-default']) ?>
    </div>

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

</div>
开发者ID:rzamarripa,项目名称:du,代码行数:30,代码来源:_search.php

示例11:

 * |___//_//____/  /_/ /_/ |_||_|     |_|
 * @link http://vistart.name/
 * @copyright Copyright (c) 2016 vistart
 * @license http://vistart.name/license/
 */
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use rhopress\Module;
/* @var $article rhopress\models\Article */
?>
        <?php 
$form = ActiveForm::begin();
?>
        <?php 
echo $form->field($article, 'title', ['template' => "{input}\n{hint}\n{error}"]);
?>
        <?php 
echo $form->field($article, 'content', ['template' => "{input}\n{hint}\n{error}"])->textarea(['rows' => 2]);
?>
 
        <hr>
        <div class="form-group">
            <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-plus"></span> ' . Module::t('views/article', 'Publish'), ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::resetButton('<span class="glyphicon glyphicon-refresh"></span> ' . Module::t('views/article', 'Reset'), ['class' => 'btn btn-danger']);
?>
        </div>
        <?php 
ActiveForm::end();
开发者ID:rhopress,项目名称:yii2-rhopress,代码行数:31,代码来源:new.php

示例12:

                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">品牌描述</label>
                        <div class="col-lg-3">
                           <?php 
echo $form->field($model, 'desc', ['options' => ['class' => ''], 'inputOptions' => ['placeholder' => '255个字内', 'class' => 'form-control']])->textarea(['rows' => 4])->label(false);
?>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <?php 
echo Html::resetButton('取消', ['class' => 'btn btn-default', "data-dismiss" => "modal"]);
?>
                            <?php 
echo Html::submitButton('添加', ['class' => 'btn btn-primary']);
?>
                        </div>
                    </div>
                <?php 
ActiveForm::end();
?>
             
               
            </div>

        </div>
        </div>
开发者ID:dlpc,项目名称:yii2-plane,代码行数:31,代码来源:brandadd.php

示例13:

    <?php 
echo $form->field($model, 'name');
?>

    <?php 
echo $form->field($model, 'parent');
?>

    <?php 
echo $form->field($model, 'route');
?>

    <?php 
echo $form->field($model, 'data');
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('rbac-admin', 'Search'), ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton(Yii::t('rbac-admin', 'Reset'), ['class' => 'btn btn-default']);
?>
    </div>

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

</div>
开发者ID:hornetalcala,项目名称:yii2-admin,代码行数:30,代码来源:_search.php

示例14:

                    </div>
                    <?php 
echo $form->field($model, 'clogo')->label('品牌logo(灰色)')->widget('common\\widgets\\file_upload\\FileUpload', ['config' => []]);
?>
                    <?php 
echo $form->field($model, 'blogo')->label('品牌logo(彩色)')->widget('common\\widgets\\file_upload\\FileUpload', ['config' => []]);
?>
                    <?php 
echo $form->errorSummary($model, ['header' => false]);
?>
                    <div class="form-group">
                        <?php 
echo Html::submitButton('确定', ['class' => 'btn btn-primary', 'name' => 'add-seller-button', 'error' => 'ss']);
?>
                        <?php 
echo Html::resetButton('重置', ['class' => 'btn btn-primary', 'name' => 'reset-button', 'error' => 'ss']);
?>
                        <a class="btn-cancel" href="<?php 
echo \common\widgets\Variable::$customerBrand_url;
?>
">返回</a>
                    </div>
                    <?php 
ActiveForm::end();
?>
                </div>
            </div>
        </div>
    </div>
</div>
开发者ID:jaybril,项目名称:www.juice.com,代码行数:30,代码来源:addBrand.php

示例15:

?>

<div class="product-relation-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

    <?php 
echo $form->field($model, 'main');
?>

    <?php 
echo $form->field($model, 'sub');
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('app/product', 'Search'), ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton(Yii::t('app/product', 'Reset'), ['class' => 'btn btn-default']);
?>
    </div>

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

</div>
开发者ID:sea129,项目名称:kbay,代码行数:30,代码来源:_search.php


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