55 lines
1.8 KiB
PHP
55 lines
1.8 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\Event */
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
?>
|
|
|
|
<div class="event-form">
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?= $form->field($model, 'startDateString')->widget(\kartik\widgets\DateTimePicker::classname(), [
|
|
'pluginOptions' => [
|
|
'autoclose' => true,
|
|
'format' => 'yyyy.mm.dd hh:ii'
|
|
],
|
|
'options' => [
|
|
'autocomplete' => 'off'
|
|
]
|
|
]);
|
|
?>
|
|
|
|
<?= $form->field($model, 'endDateString')->widget(\kartik\widgets\DateTimePicker::classname(), [
|
|
'pluginOptions' => [
|
|
'autoclose' => true,
|
|
'format' => 'yyyy.mm.dd hh:ii'
|
|
],
|
|
'options' => [
|
|
'autocomplete' => 'off'
|
|
]
|
|
])
|
|
?>
|
|
<?= $form->field($model, 'seat_count')->textInput() ?>
|
|
|
|
<?= $form->field($model, 'id_room')->dropDownList(\common\models\Room::roomOptions(false, true)) ?>
|
|
|
|
<?= $form->field($model, 'id_trainer')->dropDownList(\common\models\Trainer::trainerOptions(false, true)) ?>
|
|
|
|
<?= $form->field($model, 'id_event_type')->dropDownList(\common\models\EventType::eventTypeOptions(false, true)) ?>
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton($model->isNewRecord ? Yii::t('event', 'Create') : Yii::t('event', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|