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


PHP Html::submitButton方法代码示例

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


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

示例1:

</b> <?php 
echo Html::mailto('<span class="glyphicon glyphicon-envelope"></span>', $request->owner->email, ['title' => "Написать письмо"]);
?>
</p>


    <?php 
$form = ActiveForm::begin();
?>

    <div class="row">

        <div class="col-lg-6">

            <?php 
echo $form->field($model, 'approvedRoomId', ['errorOptions' => ['class' => 'help-block', 'encode' => false]])->widget(\kartik\select2\Select2::class, ['data' => $model::roomsList(), 'addon' => ['append' => ['content' => Html::submitButton('Согласовать', ['class' => 'btn btn-success']), 'asButton' => true]]]);
?>

        </div>

    </div>

    <?php 
echo Html::a('Отменить бронь', ['vks-request/approve-booking', 'roomId' => $model->approvedRoomId, 'requestId' => $requestIdStr, 'status' => Participant::STATUS_CANCEL], ['class' => 'btn btn-danger', 'data-method' => 'POST']);
?>

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

</div>
开发者ID:shubnikofff,项目名称:teleport,代码行数:31,代码来源:approve-room.php

示例2: 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

示例3:

$form = ActiveForm::begin(['id' => $modelEvent->formName()]);
echo $form->field($modelEvent, 'title')->Hiddeninput(['id' => 'modalTitle'])->label(false);
?>
				<input type="hidden" id="tglawal">
				<?php 
echo $form->field($modelEvent, 'MODUL_ID')->dropDownList($aryModulID, ['id' => 'modelevent-modul_id'])->label('Attendance Parent');
echo $form->field($modelEvent, 'MODUL_PRN')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $droptype, 'options' => ['id' => 'modelevent-modul_prn'], 'pluginOptions' => ['depends' => ['modelevent-modul_id'], 'url' => Url::to(['/sistem/personalia/modul-child']), 'initialize' => true]])->label('Attendance Child');
// echo FileInput::widget([
// 'name'=>'import_file',
// 'name' => 'attachment_48[]',
// 'options'=>[
// 'multiple'=>true
// ],
// 'pluginOptions' => [
// 'uploadUrl' => Url::to(['/sales/import-data/upload']),
// 'showPreview' => false,
// 'showUpload' => false,
// 'showCaption' => true,
// 'showRemove' => true,
// 'uploadExtraData' => [
// 'album_id' => 20,
// 'cat_id' => 'Nature'
// ],
// 'maxFileCount' => 10
// ]
// ]);
echo '<div style="text-align:right; padding-top:10px">';
echo Html::submitButton('Upload', ['class' => 'btn btn-success']);
echo '</div>';
ActiveForm::end();
Modal::end();
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:index.php

示例4: function

<div>

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

    <div class="row">
        <div class="col-md-8">
            <?php 
echo $form->field($model, 'searchKey')->textInput(['placeholder' => 'Введите текст заявки'])->label(false);
?>
        </div>
        <div class="col-md-4" style="vertical-align: bottom">
            <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-search"></span> Найти', ['class' => 'btn btn-primary']);
?>
        </div>
    </div>

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'topic', 'content' => function ($model) {
    return Html::a($model->topic, ['vks-request/view', 'id' => (string) $model->primaryKey]);
}, 'contentOptions' => ['style' => 'width: 62%']], ['attribute' => 'status', 'value' => function ($model) {
    return Request::statusName($model->status);
}, 'contentOptions' => ['style' => 'width: 13%']], ['attribute' => 'date', 'content' => function ($model) {
    return Yii::$app->formatter->asDate($model->date->sec) . " c {$model->beginTimeString} по {$model->endTimeString}";
开发者ID:shubnikofff,项目名称:teleport,代码行数:30,代码来源:requests.php

示例5:

<?php

/* @var $this yii\web\View */
/* @var $model app\modules\shop\models\CategoryGroup */
use app\backend\widgets\BackendWidget;
use kartik\helpers\Html;
use kartik\icons\Icon;
use kartik\widgets\ActiveForm;
$this->title = $model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update');
$this->params['breadcrumbs'] = [['label' => Yii::t('app', 'Categories groups'), 'url' => ['index']], $this->params['breadcrumbs'][] = $this->title];
?>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
    <?php 
$form = ActiveForm::begin();
?>
    <?php 
BackendWidget::begin(['icon' => 'tag', 'title' => Yii::t('app', 'Categories groups'), 'footer' => Html::a(Icon::show('arrow-circle-left') . Yii::t('app', 'Back'), Yii::$app->request->get('returnUrl', ['index', 'id' => $model->id]), ['class' => 'btn btn-danger']) . ' ' . ($model->isNewRecord ? Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go next'), ['class' => 'btn btn-success', 'name' => 'action', 'value' => 'next']) : '') . ' ' . Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go back'), ['class' => 'btn btn-warning', 'name' => 'action', 'value' => 'back']) . ' ' . Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save'])]);
?>
    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 255]);
?>
    <?php 
BackendWidget::end();
?>
    <?php 
ActiveForm::end();
?>
</div>
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:28,代码来源:edit.php

示例6: 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

示例7:

echo $form->field($model, 'email')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'newPassword')->passwordInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'newPasswordRepeat')->passwordInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(User::getStatusesArray());
?>

    <?php 
echo $form->field($model, 'role')->dropDownList(ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'description'));
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="material-icons">check</i> Добавить' : '<i class="material-icons">check</i> Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'name' => 'submit-button']);
?>
    </div>

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

</div>
开发者ID:promo-pr,项目名称:cms,代码行数:30,代码来源:_form.php

示例8:

<?php 
$form = AjaxForm::begin();
?>

<h3>Заказать обратный звонок</h3>

    <?php 
echo $form->field($model, 'name', ['options' => ['class' => 'required-name']]);
?>
    <?php 
echo $form->field($model, 'tel')->input('tel');
?>
    <div class="form-group">
        <label style="width: 100%">Удобное для звонка время</label>
        <?php 
echo $form->field($model, 'hour', ['template' => '{input}'])->dropDownList(['08' => '08', '09' => '09', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18'], ['prompt' => 'Час']);
?>
        <?php 
echo $form->field($model, 'min', ['template' => '{input}'])->dropDownList(['00' => '00', '15' => '15', '30' => '30', '45' => '45'], ['prompt' => 'Мин']);
?>
        <?php 
echo Html::submitButton('Заказать', ['class' => 'btn btn-success btn-33', 'name' => 'contact-button']);
?>
    </div>

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

开发者ID:promo-pr,项目名称:cms,代码行数:28,代码来源:call.php

示例9:

use kartik\widgets\ActiveForm;
use app\modules\data\assets\DataAsset;
DataAsset::register($this);
$this->title = $object->name . ' ' . ($importMode ? Yii::t('app', 'Import') : Yii::t('app', 'Export'));
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Data'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
if (isset($fields['object']) && !empty($fields['object'])) {
    ?>
    <?php 
    $form = ActiveForm::begin(['id' => 'form-data', 'type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
    ?>
    <?php 
    BackendWidget::begin(['icon' => 'list', 'title' => $object->name . ' - ' . Yii::t('app', 'Fields'), 'footer' => Html::submitButton(Icon::show('save') . Yii::t('app', 'Submit'), ['class' => 'btn btn-primary'])]);
    ?>
    <?php 
    echo \yii\helpers\Html::activeHiddenInput($model, 'object');
    ?>
    <div class="form-group row">
        <div class="col-md-6">
            <?php 
    echo \yii\helpers\Html::button(Yii::t('app', 'Select All'), ['id' => 'select_all', 'class' => 'btn btn-success btn-sm']);
    ?>
            <?php 
    echo \yii\helpers\Html::button(Yii::t('app', 'Unselect All'), ['id' => 'unselect_all', 'class' => 'btn btn-warning btn-sm']);
    ?>
        </div>
    </div>
开发者ID:yii2ApplicationCollect,项目名称:dotplant2,代码行数:30,代码来源:import-export.php

示例10:

$this->beginBlock('title');
echo Html::encode($this->title);
$this->endBlock();
?>

<div class="container">
    <p><?php 
echo Module::t('module', 'PLEASE_FILL_FOR_RESET');
?>
</p>

    <div class="row">
        <div class="col-lg-5">
            <?php 
$form = ActiveForm::begin(['id' => 'password-reset-form']);
?>
            <?php 
echo $form->field($model, 'password')->passwordInput();
?>
            <div class="form-group">
                <?php 
echo Html::submitButton('Save', ['class' => 'btn btn-primary', 'name' => 'reset-button']);
?>
            </div>
            <?php 
ActiveForm::end();
?>
        </div>
    </div>
</div>
开发者ID:promo-pr,项目名称:cms,代码行数:30,代码来源:passwordReset.php

示例11:

?>

    <div id="participants-container">

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

    </div>

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

    <?php 
echo Html::submitButton($submitText, ['class' => 'btn btn-primary']);
?>

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

</div>

<?php 
RequestFormAsset::register($this);
?>

<?php 
$options = \yii\helpers\Json::encode(['refreshParticipantsRoute' => $model->isNewRecord ? Url::to(['refresh-participants']) : Url::to(['refresh-participants', 'requestId' => (string) $model->primaryKey]), 'participantsContainerSelector' => '#participants-container', 'dateSelector' => '#requestform-dateinput', 'beginTimeSelector' => '#requestform-begintimeinput', 'endTimeSelector' => '#requestform-endtimeinput', 'dateTimeControlsSelector' => 'div.vks-date-time', 'modeSelector' => 'input[name="RequestForm[mode]"]', 'withVksMode' => $model::MODE_WITH_VKS, 'withoutVksMode' => $model::MODE_WITHOUT_VKS, 'audioRecordSelector' => '#vks-audio-record', 'equipmentSelector' => '#vks-equipment']);
$this->registerJs("\$('form').requestForm({$options});");
开发者ID:shubnikofff,项目名称:teleport,代码行数:31,代码来源:_form.php

示例12:

            <?php 
$form = ActiveForm::begin(['id' => 'reset-password-form']);
?>

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

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

            <div class="form-group">

                <?php 
echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary']);
?>

            </div>

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

        </div>

    </div>

</div>
开发者ID:shubnikofff,项目名称:teleport,代码行数:29,代码来源:resetPassword.php

示例13:

/* title pada header page */
$this->params['breadcrumbs'][] = $this->title;
/* belum di gunakan karena sudah ada list sidemenu, on plan next*/
?>
<div class="container" >
    <div class="row" style="padding-left: 5px; padding-right: 5px">
        <div class="col-sm-12 col-md-12 col-lg-12 ">
			<!-- EXAMPLE FORM IMPORT -->
			<?php 
$form = \yii\widgets\ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data'], 'action' => ['import']]);
?>
			<?php 
echo $form->field($modelImport, 'fileImport')->fileInput();
?>
			<?php 
echo Html::submitButton('Import', ['class' => 'btn btn-primary']);
?>
			<?php 
\yii\widgets\ActiveForm::end();
?>
			<!-- EXAMPLE FORM IMPORT -->

			<!-- EXAMPLE BUTTON EXPORT PHPEXCEL -->
			<?php 
echo Html::a('Export Excel', ['export-excel'], ['class' => 'btn btn-info']);
?>
  

			<!-- EXAMPLE BUTTON EXPORT OPENTBS -->
			<?php 
echo Html::a('Export Word', ['export-word'], ['class' => 'btn btn-warning']);
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:index.php

示例14:

?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
$form = ActiveForm::begin(['id' => 'route-form', 'type' => ActiveForm::TYPE_HORIZONTAL]);
?>

<?php 
$this->beginBlock('submit');
?>
<div class="form-group no-margin">
    <?php 
echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php 
$this->endBlock('submit');
?>


<section id="widget-grid">
    <div class="row">
        
        <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6">

            <?php 
BackendWidget::begin(['title' => Yii::t('app', 'Route'), 'icon' => 'cogs', 'footer' => $this->blocks['submit']]);
?>
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:31,代码来源:edit.php

示例15: 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


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