Основное
= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'type')->dropDownList(Trigger::getTypes(), [
'prompt' => '--- выберите тип ---'
]) ?>
= $form->field($model, 'active')->checkbox() ?>
Условия
= $form->field($model, 'trig_time')->widget(TimePicker::className(), [
'pluginOptions' => [
'showMeridian' => false,
'defaultTime' => false,
],
]) ?>
= $form->field($model, 'trig_time_wdays')->textInput(['maxlength' => true]) ?>
= $form->field($model, 'trig_date')->widget(DateControl::className(), [
'type' => DateControl::FORMAT_DATETIME,
'displayTimezone' => Yii::$app->formatter->timeZone,
'saveFormat' => 'php:U',
'options' => [
'pluginOptions' => [
'todayHighlight' => true,
'todayBtn' => true,
],
],
]) ?>
= $form->field($model, 'trig_item_id')->widget(Select2::className(), [
'data' => Item::getList(),
'options' => [
'placeholder' => 'Выберите элемент ...',
],
]) ?>
= $form->field($model, 'trig_item_value')->textInput(['maxlength' => true]) ?>
Выполнить
= $form->field($model, 'task_ids')->widget(Select2::className(), [
'data' => \app\models\Task::getList(),
'showToggleAll' => false,
'options' => [
'placeholder' => 'Выберите задачи ...',
'multiple' => true,
],
]) ?>
= Html::submitButton($model->isNewRecord ? 'Добавить' : 'Сохранить',
['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>