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


PHP Html::resetButton方法代码示例

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


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

示例1: getDefaultButton

 /**
  * Gets the default button
  *
  * @param string $type the button type
  * @param string $icon the glyphicon icon suffix name
  * @param string $title the title to display on hover
  *
  * @return string
  */
 protected function getDefaultButton($type, $icon, $title)
 {
     $buttonOptions = $type . 'Options';
     $options = $this->{$buttonOptions};
     $label = ArrayHelper::remove($options, 'label', "<i class='glyphicon glyphicon-{$icon}'></i>");
     if (empty($options['class'])) {
         $options['class'] = 'kv-action-btn';
     }
     Html::addCssClass($options, 'kv-btn-' . $type);
     $options = ArrayHelper::merge(['title' => $title], $options);
     if ($this->tooltips) {
         $options['data-toggle'] = 'tooltip';
         $options['data-container'] = 'body';
     }
     switch ($type) {
         case 'reset':
             return Html::resetButton($label, $options);
         case 'save':
             return Html::submitButton($label, $options);
         case 'delete':
             $url = ArrayHelper::remove($options, 'url', '#');
             return Html::a($label, $url, $options);
     }
     $options['type'] = 'button';
     return Html::button($label, $options);
 }
开发者ID:rumatakira,项目名称:yii2-detail-view,代码行数:35,代码来源:DetailView.php

示例2: getButton

 /**
  * Gets the HTML markup for the action button
  *
  * @param $type string, button type, `reset` or `submit`
  * @param $options the HTML attributes for the button
  * @return string
  */
 protected static function getButton($type, &$options)
 {
     $icon = ArrayHelper::remove($options, 'icon', '');
     if ($icon != '') {
         $icon = '<span class="glyphicon glyphicon-' . $icon . '"></span> ';
     }
     $label = $icon . ArrayHelper::remove($options, 'label', '');
     return $type == 'reset' ? Html::resetButton($label, $options) : Html::submitButton($label, $options);
 }
开发者ID:imagis,项目名称:yii2-user,代码行数:16,代码来源:BaseForm.php

示例3: getDefaultButton

 /**
  * Gets the default button
  *
  * @param string $type the button type
  * @param string $icon the glyphicon icon suffix name
  * @param string $title the title to display on hover
  *
  * @return string
  */
 protected function getDefaultButton($type, $icon, $title)
 {
     $buttonOptions = $type . 'Options';
     $options = $this->{$buttonOptions};
     $btnStyle = empty($this->panel['type']) ? self::TYPE_DEFAULT : $this->panel['type'];
     $label = ArrayHelper::remove($options, 'label', "<i class='glyphicon glyphicon-{$icon}'></i>");
     if (empty($options['class'])) {
         $options['class'] = 'btn btn-xs btn-' . $btnStyle;
     }
     Html::addCssClass($options, 'kv-btn-' . $type);
     $options = ArrayHelper::merge(['title' => $title], $options);
     if ($this->tooltips) {
         $options['data-toggle'] = 'tooltip';
         $options['data-container'] = 'body';
     }
     if ($type === 'reset') {
         return Html::resetButton($label, $options);
     } elseif ($type === 'save') {
         return Html::submitButton($label, $options);
     } elseif ($type === 'delete') {
         $url = ArrayHelper::remove($options, 'url', '#');
         return Html::a($label, $url, $options);
     } else {
         $options['type'] = 'button';
         return Html::button($label, $options);
     }
 }
开发者ID:pdbangibang,项目名称:apc-softdev-gd121mi122-4,代码行数:36,代码来源:DetailView.php

示例4:

<?php

use kartik\helpers\Html;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
use kartik\builder\FormGrid;
use yii\helpers\ArrayHelper;
use kartik\markdown\Markdown;
use lukisongroup\hrd\models\Groupfunction;
use lukisongroup\hrd\models\Groupseqmen;
use lukisongroup\hrd\models\Jobgrade;
$form = ActiveForm::begin(['id' => 'grading-form-id', 'type' => ActiveForm::TYPE_HORIZONTAL]);
$GradingInput = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['GF_ID' => ['label' => 'GRP FUNCTION', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id'], 'hint' => 'Pilih Group Function', 'columnOptions' => ['colspan' => 6]], 'SEQ_ID' => ['label' => 'GRP SEQMEN', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id'], 'hint' => 'Pilih Group Sequen', 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_ID' => ['label' => 'GRADING', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_ID', 'JOBGRADE_NM'), 'options' => ['id' => 'grading-id'], 'hint' => 'Pilih Grading Karyawan', 'columnOptions' => ['colspan' => 6]], 'SORT' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_DCRP' => ['label' => 'DCRP', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 6]]]], ['columns' => 1, '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>']]]]]);
/*Panel List Group*/
echo Html::listGroup([['content' => 'INPUT GRADING MODUL', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $GradingInput]]);
ActiveForm::end();
开发者ID:adem-team,项目名称:advanced,代码行数:16,代码来源:_form.php

示例5:

<?php

use kartik\helpers\Html;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
use kartik\builder\FormGrid;
use yii\helpers\ArrayHelper;
use kartik\markdown\Markdown;
$form = ActiveForm::begin(['id' => 'grading-id', 'type' => ActiveForm::TYPE_HORIZONTAL]);
$GradingInput = FormGrid::widget(['id' => 'fg-grading', 'model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['JOBGRADE_ID' => ['label' => 'Jobgrade.ID', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Input Jobgrade ID...'], 'columnOptions' => ['colspan' => 5]], 'JOBGRADE_NM' => ['label' => 'Jobgrade.NM', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Input Jobgrade Name...'], 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_DCRP' => ['label' => 'Description', 'type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Input Jobgrade Description...'], 'columnOptions' => ['colspan' => 6]], 'SORT' => ['label' => 'Sort', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Input nilai Urutan...'], 'columnOptions' => ['colspan' => 6]]]], ['columns' => 1, '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>']]]]]);
/*Panel List Group*/
echo Html::listGroup([['content' => 'INPUT GRADING', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $GradingInput]]);
ActiveForm::end();
?>

开发者ID:C12D,项目名称:advanced,代码行数:14,代码来源:_form.php

示例6: function

?>

        <?php 
$query = Participant::find()->select(['_id', 'name', 'companyId'])->with('company');
$participants = ArrayHelper::toArray($query->all(), [Participant::className() => ['id' => function ($item) {
    return (string) $item->primaryKey;
}, 'name', 'company' => 'company.name']]);
$participantsIdData = ArrayHelper::map($participants, 'id', 'name', 'company');
?>

        <?php 
echo $form->field($model, 'participantsId')->widget(Select2::className(), ['data' => $participantsIdData, 'showToggleAll' => false, 'options' => ['placeholder' => 'Фильтр по участникам', 'multiple' => true], 'pluginOptions' => ['width' => '600px']]);
?>

        <?php 
echo Html::resetButton('Сброс', ['class' => 'btn btn-primary']);
?>

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

        <?php 
Pjax::begin(['formSelector' => '#vks-search-form', 'options' => ['style' => 'padding-top: 20px']]);
?>

        <?php 
echo $this->render('_schedule', ['model' => $model, 'dataProvider' => $dataProvider, 'participantsCountPerHour' => $participantsCountPerHour]);
?>

        <?php 
开发者ID:shubnikofff,项目名称:teleport,代码行数:31,代码来源:index.php

示例7: Date

use lukisongroup\hrd\models\Groupfunction;
use lukisongroup\hrd\models\Groupseqmen;
use lukisongroup\hrd\models\Jobgrade;
use lukisongroup\hrd\models\Status;
use lukisongroup\hrd\models\Employe;
use yii\helpers\Url;
use kartik\widgets\DepDrop;
//use lukisongroup\models\system\side_menu\M1000;
//use kartik\sidenav\SideNav;
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'options' => ['enctype' => 'multipart/form-data'], 'id' => 'emp-form1-create', 'enableClientValidation' => true]);
//$form = ActiveForm::begin(['type'=>ActiveForm::TYPE_HORIZONTAL]);
//$form = ActiveForm::begin(['type'=>ActiveForm::TYPE_VERTICAL]);
/*Author: -ptr.nov- Generate digit EMP_ID */
/*Get Id count Author:-ptr.nov-*/
//$cnt= (Employe::find()->count())+1;
/*get ID Sparator Array , Author: -ptr.nov-*/
//$sql = 'SELECT max(EMP_ID) as EMP_ID FROM a0001';
//$cnt= Employe::findBySql($sql)->one();
///$arySplit=explode('.',$cnt->EMP_ID);
//$str_id_cnt=trim($arySplit[2]);
//print_r($str_id_cnt+1);
//$id_cnt=$str_id_cnt+1;
/*Combine String and Digit Author: -ptr.nov- */
//$digit=str_pad($id_cnt,4,"0",STR_PAD_LEFT);
//$thn=date("Y");
//$nl='LG'.'.'.$thn.'.'.$digit;
/*Author: Eka Side Menu */
//$side_menu=\yii\helpers\Json::decode(M1000::find()->findMenu('hrd')->one()->jval);
$EmployeeInput = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['employe_identity' => ['label' => 'GENERATE CODE BY COORPORATE :', 'attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'options' => ['id' => 'cat-id'], 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['label' => 'Employee.ID', 'attributes' => ['EMP_ID' => ['disabled' => true, 'type' => Form::INPUT_WIDGET, 'widgetClass' => 'kartik\\widgets\\DepDrop', 'options' => ['options' => ['id' => 'subcat-id', 'readonly' => true, 'selected' => false], 'pluginOptions' => ['depends' => ['cat-id'], 'url' => Url::to(['/hrd/employe/subcat']), 'initialize' => true, 'placeholder' => false]], 'columnOptions' => ['colspan' => 3]], 'EMP_NM' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 1]], 'EMP_NM_BLK' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 1]]]]]], ['contentBefore' => '<legend class="text-info"><small>COORPORATE IDENTITY</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['employe_identity' => ['attributes' => ['EMP_CORP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_ID', 'CORP_NM'), 'options' => ['placeholder' => 'Select Coorporate...'], 'hint' => 'Pilih Perusahaan', 'columnOptions' => ['colspan' => 12]], 'DEP_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_ID', 'DEP_NM'), 'options' => ['id' => 'dept-id'], 'hint' => 'Pilih Department', 'columnOptions' => ['colspan' => 12]], 'DEP_SUB_ID' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DepDrop', 'options' => ['id' => 'subdept-id', 'pluginOptions' => ['depends' => ['dept-id'], 'url' => Url::to(['/hrd/employe/subdept']), 'initialize' => true, 'params' => [''], 'loadingText' => 'Sub Department ...']], 'hint' => 'Pilih Sub Department', 'columnOptions' => ['colspan' => 12]], 'GF_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id'], 'hint' => 'Pilih Group Function', 'columnOptions' => ['colspan' => 12]], 'SEQ_ID' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id'], 'hint' => 'Pilih Group Sequen', 'columnOptions' => ['colspan' => 12]], 'JOBGRADE_ID' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DepDrop', 'options' => ['id' => 'grading-id', 'pluginOptions' => ['depends' => ['Groupfnc-id', 'Groupseq-id'], 'url' => Url::to(['/hrd/employe/grading']), 'initialize' => true, 'params' => [''], 'loadingText' => 'Sub Department ...']], 'hint' => 'Pilih Grading Karyawan ', 'columnOptions' => ['colspan' => 12]], 'EMP_STS' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_ID', 'STS_NM'), 'hint' => 'Pilih Status Karyawan', 'columnOptions' => ['colspan' => 12]], 'EMP_JOIN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'enableonreadonly' => false, 'todayHighlight' => true], 'pluginEvents' => ['show' => "function(e) {show}"]], 'hint' => 'Enter Join Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 12]], 'EMP_RESIGN_DATE' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true], 'pluginEvents' => ['show' => "function(e) {show}"]], 'hint' => 'Enter Resign Date (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 12]]]]]], ['contentBefore' => '<legend class="text-info"><small>EMPLOYEE PROFILE</small></legend>', 'columns' => 1, 'autoGenerateColumns' => false, 'attributes' => ['address_detail' => ['label' => 'Address', 'attributes' => ['EMP_KTP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter NO KTP...'], 'columnOptions' => ['colspan' => 12]], 'EMP_ALAMAT' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => 'kartik\\markdown\\MarkdownEditor', 'value' => '<span class="text-justify"><em>' . $model->EMP_ALAMAT . '</em></span>', 'columnOptions' => ['colspan' => 12]], 'EMP_ZIP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Zip...'], 'columnOptions' => ['colspan' => 6]], 'EMP_HP' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Phone...'], 'columnOptions' => ['colspan' => 6]], 'EMP_TGL_LAHIR' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\DatePicker', 'options' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'startView' => true], 'pluginEvents' => ['show' => "function(e) {show}"]], 'hint' => 'Enter birthday  (yyyy-mm-dd)', 'columnOptions' => ['colspan' => 6]], 'EMP_GENDER' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['Male' => 'Male', 'Female' => 'Female'], 'options' => ['inline' => 'Male'], 'columnOptions' => ['colspan' => 6]], 'EMP_EMAIL' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'acount@lukison.com', 'addon' => ['prepend' => ['content' => '@']]], 'columnOptions' => ['colspan' => 6]]]]]], ['columns' => 3, 'attributes' => ['address_detail' => ['label' => 'Picture', 'columns' => 6, 'attributes' => ['upload_file' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\FileInput', 'options' => ['pluginOptions' => ['showPreview' => true, 'showCaption' => false, 'showRemove' => false, 'showUpload' => false]], '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>']]]]]);
echo Html::listGroup([['content' => 'IINPUT DATA KARYAWAN', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $EmployeeInput]]);
ActiveForm::end();
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_form-ver1.php

示例8:

        <?php 
if ($this->context->module->passwordSettings['strengthMeter']) {
    echo $form->field($model, 'password')->widget('\\kartik\\password\\PasswordInput');
} else {
    echo $form->field($model, 'password')->passwordInput();
}
?>
        <?php 
echo $form->field($model, 'password_confirm')->passwordInput();
?>
        <?php 
echo $form->field($model, 'email');
?>
        <?php 
echo Html::activeHiddenInput($model, 'action');
?>
    </div>
    <div class="y2u-box-footer">
        <?php 
echo Html::a('&laquo; ' . Yii::t('user', 'Back'), ['install/index'], ['class' => 'btn btn-danger pull-left']);
?>
        <?php 
echo Html::resetButton('<i class="glyphicon glyphicon-remove"></i> ' . Yii::t('user', 'Reset'), ['class' => 'btn btn-default']);
?>
        <?php 
echo Html::submitButton('<i class="glyphicon glyphicon-ok"></i> ' . Yii::t('user', 'Finish'), ['class' => 'btn btn-success']);
?>
    </div>
</div>
<?php 
ActiveForm::end();
开发者ID:imagis,项目名称:yii2-user,代码行数:31,代码来源:install.php


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