本文整理汇总了PHP中kartik\datecontrol\DateControl::classname方法的典型用法代码示例。如果您正苦于以下问题:PHP DateControl::classname方法的具体用法?PHP DateControl::classname怎么用?PHP DateControl::classname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\datecontrol\DateControl
的用法示例。
在下文中一共展示了DateControl::classname方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
</div>
<div id="corpo-filtro-nota" class="panel-body collapse in">
<?php
$form = ActiveForm::begin(['id' => 'filtroConteudo']);
?>
<div class="row">
<div class="col-sm-6 col-lg-4">
<?php
echo $form->field($searchConteudo, 'dataInicial')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>
</div>
<div class="col-sm-6 col-lg-4">
<?php
echo $form->field($searchConteudo, 'dataFinal')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>
</div>
<div class="col-sm-6 col-lg-4">
<?php
echo $form->field($searchConteudo, 'horas')->widget(Select2::classname(), ['name' => 'state_3', 'data' => ArrayHelper::map($horas, 'timeid', 'beginhour'), 'id' => 'combo', 'pluginOptions' => [], 'options' => ['placeholder' => 'Selecione os Horários', 'multiple' => true]]);
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::Button('Pesquisa conteúdo ', ['class' => 'btn btn-primary', 'onclick' => "ajaxConteudoAula('index.php?r=portal-professor/frequencia', 'filtroConteudo')"]);
?>
</div>
示例2:
<div class="horario-form">
<?php
$form = ActiveForm::begin();
?>
<?php
echo $form->field($model, 'descricao')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'inicio')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_TIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true, 'defaultTime' => false]]]);
?>
<?php
echo $form->field($model, 'termino')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_TIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true, 'defaultTime' => false]]]);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例3: JsExpression
$form->field($model, 'forma_pagamento_id')->widget(Select2::classname(), [
'pluginOptions' => [
'allowClear' => true,
'minimumInputLength' => 2,
'ajax' => [
'url' => $url_forma_pagamento,
'dataType' => 'json',
'data' => new JsExpression('function(params) { return {search:params.term};}')
],
],
'options' => ['placeholder' => 'Selecione um cliente...'],
]) ?>
</div>
<div class="row">
<div class="col-md-4"><?= $form->field($model, 'data_vencimento')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]) ?></div>
<div class="col-md-4"><?= $form->field($model, 'data_pagamento')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]) ?></div>
<div class="col-md-4"><?= $form->field($model, 'status')->dropDownList([ 'Aberto' => 'Aberto', 'Pago' => 'Pago', ], ['prompt' => '']) ?></div>
</div>
<div class="row">
<div class="col-md-12"><?= $form->field($model, 'obs')->textarea(['rows' => 6]) ?></div>
</div>
</div>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
示例4:
<?php
echo $form->field($model, 'edital')->textInput(['readonly' => true]);
?>
<?php
$data_cargos = ArrayHelper::map($cargos, 'descricao', 'descricao');
echo $form->field($model, 'cargo')->widget(Select2::classname(), ['data' => array_merge(["" => ""], $data_cargos), 'options' => ['placeholder' => 'Selecione o cargo...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
echo $form->field($model, 'nome')->textInput(['maxlength' => true, 'placeholder' => 'Nome completo...']);
?>
<?php
echo $form->field($model, "datanascimento")->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATETIME, 'displayFormat' => 'dd/MM/yyyy', 'autoWidget' => false, 'widgetClass' => 'yii\\widgets\\MaskedInput', 'options' => ['mask' => '99/99/9999', 'options' => ['class' => 'form-control', 'placeholder' => 'Data nascimento...']]]);
?>
<?php
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['cpf' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu CPF...']], 'identidade' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu RG...']], 'orgao_exped' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe o orgão expedidor...']], 'sexo' => ['type' => Form::INPUT_RADIO_LIST, 'items' => [true => 'Masculino', false => 'Feminino'], 'options' => ['inline' => true]]]]);
?>
<?php
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['email' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail...']], 'emailAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail alternativo...']], 'telefone' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone...']], 'telefoneAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone alternativo...']]]]);
?>
<?php
$form->field($model, 'cpf')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '999.999.999-99']);
?>
<?php
示例5:
<?= $form->field($modelRelatorio, 'inicio_intervalo')->widget(DateControl::classname(), [
'type'=>DateControl::FORMAT_DATE,
'ajaxConversion'=>false,
'options' => [
'pluginOptions' => [
'autoclose' => true
]
],
'displayFormat' => 'dd/MM/yyyy',
'language'=>'pt',
]);?>
<?= $form->field($modelRelatorio, 'fim_intervalo')->widget(DateControl::classname(), [
'type'=>DateControl::FORMAT_DATE,
'ajaxConversion'=>false,
'options' => [
'pluginOptions' => [
'autoclose' => true
]
],
'displayFormat' => 'dd/MM/yyyy',
'language'=>'pt',
]); ?>
<?= $form->field($modelRelatorio, 'usuario_id' )->hiddenInput(['value'=>Yii::$app->user->getId()])->label(false); ?>
<div class="form-group">
<?= Html::submitButton($modelRelatorio->isNewRecord ? Yii::t('yii', 'Create') : Yii::t('yii', 'Update'),
示例6: Employee
/* @var $model app\models\Fregat\Osmotraktmat */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="osmotraktmat-form">
<?php
$form = ActiveForm::begin(['id' => 'Osmotraktmatform']);
?>
<?php
echo !$model->isNewRecord ? $form->field($model, 'osmotraktmat_id')->textInput(['maxlength' => true, 'class' => 'form-control', 'disabled' => true]) : '';
?>
<?php
echo $form->field($model, 'osmotraktmat_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>
<?php
echo $form->field($model, 'id_master')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_master', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете пользователя', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>
<?php
ActiveForm::end();
?>
<?php
if (!$model->isNewRecord) {
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'tr-mat-osmotrgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMat.idMattraffic.idMaterial.idMatv.matvid_name', 'idTrMat.idMattraffic.idMaterial.material_name', 'idTrMat.idMattraffic.idMaterial.material_inv', ['attribute' => 'idTrMat.idMattraffic.mattraffic_number', 'label' => 'Всего количество у материально-ответственного лица', 'visible' => false], 'tr_mat_osmotr_number', ['attribute' => 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idTrMat.idParent.idMaterial.material_name', 'label' => 'В составе материальной ценности'], ['attribute' => 'idTrMat.idParent.idMaterial.material_inv', 'label' => 'Инвентарный номер материальной ценности в которую укомплектовано'], 'idReason.reason_text', 'tr_mat_osmotr_comment'], 'buttons' => ['update' => ['Fregat/tr-mat-osmotr/update'], 'deleteajax' => ['Fregat/tr-mat-osmotr/delete']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Осмотренные материалы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материал', ['Fregat/tr-mat-osmotr/create', 'foreignmodel' => 'TrMatOsmotr', 'url' => $this->context->module->requestedRoute, 'field' => 'id_osmotraktmat', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>
示例7: function
use common\widgets\elfinder\InputFile;
use yii\bootstrap\Modal;
use mihaildev\elfinder\ElFinder;
use yii\web\JsExpression;
/**
* @var yii\web\View $this
* @var common\models\Post $model
* @var yii\widgets\ActiveForm $form
*/
?>
<div class="post-form">
<?php
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100, 'plugins' => ['elfinder', 'fontcolor']]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\User::find()->all(), 'id', 'username'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'category_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\PostCategory::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'state_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\Post())->getStateIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'main_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Главная...']], 'noforeign_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Noforeign ID...', 'maxlength' => 11]], 'created_datetime' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATETIME]], 'start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_TIME]], 'preview_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']], 'doc_file' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']]]]);
/*
?>
<script>
if (!RedactorPlugins) var RedactorPlugins = {};
RedactorPlugins.elfinder = function()
{
return {
init: function()
{
var elfinder = this.button.add('elfinder', 'Elfinder');
this.button.setAwesome('elfinder', 'fa-elfinder');
this.button.addCallback(elfinder, this.elfinder.openElfinder);
},
openElfinder: function()
{
示例8: isset
return isset($glprep_rlocat[$model->glprep_rlocat]) ? $glprep_rlocat[$model->glprep_rlocat] : '';
}]], 'buttons' => array_merge(!$dopparams['DisableElements'] ? ['deleteajax' => ['Glauk/glprep/delete', 'glprep_id']] : [])]), 'gridOptions' => ['dataProvider' => $dopparams['dataProviderglprep'], 'filterModel' => $dopparams['searchModelglprep'], 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-tint"></i> Препараты</h3>', 'before' => !$dopparams['DisableElements'] ? Html::a('<i class="glyphicon glyphicon-download"></i> Добавить препарат', ['Glauk/glprep/create', 'idglaukuchet' => $model->glaukuchets->glaukuchet_id], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
}
?>
<div class="panel panel-<?php
echo Yii::$app->params['panelStyle'];
?>
">
<div class="panel-heading"><?php
echo Html::encode('Снятие с учета');
?>
</div>
<div class="panel-body">
<?php
echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_deregdate')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control', 'disabled' => $dopparams['DisableElements']]], 'saveOptions' => ['class' => 'form-control setsession', 'form' => $formname]]);
?>
<?php
echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_deregreason')->widget(Select2::classname(), ['hideSearch' => true, 'data' => $dopparams['Glaukuchet']->VariablesValues('glaukuchet_deregreason'), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберете причину снятия с учета', 'class' => 'form-control setsession', 'form' => $formname, 'disabled' => $dopparams['DisableElements']], 'theme' => Select2::THEME_BOOTSTRAP]);
?>
</div>
</div>
<?php
echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_comment')->textarea(['class' => 'form-control setsession', 'form' => $formname, 'maxlength' => 512, 'placeholder' => 'Введите комментарий к карте глаукомного пациента', 'rows' => 10, 'disabled' => $dopparams['DisableElements'], 'style' => 'resize: none']);
?>
</div>
</div>
<?php
}
示例9:
?>
<div class="evento-form">
<?php
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
<div style='float: left ;margin-left: 10%; margin: 0 0 5% 10%;'>
<?php
echo $form->field($model, 'dataIni')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'language' => 'pt-BR', 'displayFormat' => 'php:d-F-Y']);
?>
</div>
<div style='float: left ;margin-left: 10%; margin: 0 0 5% 10%;'>
<?php
echo $form->field($model, 'datafim')->widget(DateControl::classname(), ['language' => 'pt-BR', 'type' => DateControl::FORMAT_DATE, 'displayFormat' => 'php:d-F-Y']);
?>
</div>
<?php
echo Html::submitButton('relatorios');
?>
<?php
ActiveForm::end();
?>
</div>
示例10:
use kartik\money\MaskMoney;
/* @var $this yii\web\View */
/* @var $model app\models\OrdenCompra */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="orden-compra-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'folio')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'requisicion_did')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'codicionpago')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'estatus_did')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'fechaCreacion_ft')->widget(DateControl::classname(), [
'type'=>DateControl::FORMAT_DATETIME,
]); ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Crear' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
示例11:
$form = ActiveForm::begin();
?>
<?php
echo Html::activeHiddenInput($model, 'student_id', ['value' => $student->id]);
?>
<?php
echo $form->field($model, 'rank_id')->dropDownList(Rank::getMap());
?>
<?php
echo $form->field($model, 'testing_session_id')->textInput();
?>
<?php
echo $form->field($model, 'date')->widget(DateControl::classname(), ['widgetClass' => '\\yii\\widgets\\MaskedInput', 'options' => ['mask' => '99/99/9999']]);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例12:
<div class="panel panel-<?php
echo Yii::$app->params['panelStyle'];
?>
">
<div class="panel-heading"><?php
echo Html::encode('Приход');
?>
</div>
<div class="panel-body">
<?php
echo $form->field($Mattraffic, 'id_mol')->widget(Select2::classname(), Proc::DGselect2(['model' => $Mattraffic, 'resultmodel' => new app\models\Fregat\Employee(), 'fields' => ['keyfield' => 'id_mol', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете материально отчетственное лицо', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput', 'disabled' => $disabled]));
?>
<?php
echo $form->field($Mattraffic, 'mattraffic_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']], 'disabled' => $disabled]);
?>
</div>
</div>
<?php
ActiveForm::end();
?>
<?php
if (!$model->isNewRecord) {
?>
<div class="panel panel-<?php
echo Yii::$app->params['panelStyle'];
?>
示例13:
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
* @var yii\web\View $this
* @var common\models\Post $model
* @var yii\widgets\ActiveForm $form
*/
?>
<div class="post-search">
<?php
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'action' => ['index'], 'method' => 'get']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\User::find()->all(), 'id', 'username'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'category_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\PostCategory::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'state_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\Post())->getStateIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'main_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Главная...']], 'noforeign_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Noforeign ID...', 'maxlength' => 11]], 'created_datetime' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATETIME]], 'start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_TIME]]]]);
?>
<div class="form-group">
<?php
echo Html::a(Yii::t('app', 'Reset'), ['index'], ['class' => 'btn btn-default', 'style' => 'margin-left: 15px; margin-right: 10px']);
?>
<?php
echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例14:
?>
<div class="form-group">
<?php
echo $form->field($searchModel, 'author_id')->dropDownList(ArrayHelper::merge([0 => 'Автор'], ArrayHelper::map(Authors::find()->all(), 'id', 'fullname')), ['options' => ['class' => 'form-control', $searchModel->author_id => ['selected' => true]]])->label(false);
?>
</div>
<div class="form-group">
<?php
echo $form->field($searchModel, 'name')->textInput(['placeholder' => Yii::t('app', 'Book Name')])->label(false);
?>
</div>
<div class="row" style="padding-left:15px;">
<?php
echo $form->field($searchModel, 'date_from')->widget(DateControl::classname(), ['saveFormat' => 'php:Y-m-d H:i:s', 'ajaxConversion' => true, 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>
<?php
echo $form->field($searchModel, 'date_to')->widget(DateControl::classname(), ['saveFormat' => 'php:Y-m-d H:i:s', 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>
</div>
<div class="row" style="padding-left:15px;padding-top:15px;margin-bottom:15px;">
<?php
echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']);
?>
<?php
echo Html::a(Yii::t('app', 'Clear Filter'), Url::to(['books/index']), ['class' => 'btn btn-default']);
?>
</div>
</div>
示例15:
<?php
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
* @var yii\web\View $this
* @var common\models\SliderImage $model
* @var yii\widgets\ActiveForm $form
*/
?>
<div class="slider-image-form">
<?php
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['publish_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Опубликовано...']], 'slider' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Слайдер...']], 'href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'menu_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('menu_image') ? Html::img($model->getUploadUrl('menu_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'href_enabled_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Показывать кнопку перейти...']], 'created_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'iframe_href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка на iframе(если указан изображения игнорируются)...', 'maxlength' => 255]], 'banner_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_image') ? Html::img($model->getUploadUrl('banner_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_phone_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_phone_image') ? Html::img($model->getUploadUrl('banner_phone_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_tablet_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_tablet_image') ? Html::img($model->getUploadUrl('banner_tablet_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>
</div>