add changes to create ticket
This commit is contained in:
@@ -2,46 +2,68 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use frontend\components\HtmlHelper;
|
||||
use kartik\widgets\DatePicker;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
/* @var $accounts common\models\Account[] */
|
||||
/* @var $ticketTypes common\models\TicketType[] */
|
||||
/* @var $discounts common\models\Discount[] */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="ticket-form">
|
||||
<?php
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
$accountOptions = HtmlHelper::mkAccountOptions($accounts);
|
||||
$discountOptions = HtmlHelper::mkDiscountOptions($discounts);
|
||||
$ticketTypeOptions = HtmlHelper::mkTicketTypeOptions($ticketTypes);
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?= $form->field($model, 'id_user')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket_type')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_account')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_discount')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'start')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'end')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'max_usage_count')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'usage_count')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'status')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'price_brutto')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'comment')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'created_at')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'updated_at')->textInput() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/ticket', 'Create') : Yii::t('common/ticket', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
<div class="row" >
|
||||
<div class="col-md-12" >
|
||||
<div class="ticket-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket_type')->dropDownList($ticketTypeOptions) ?>
|
||||
|
||||
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
||||
|
||||
<?= $form->field($model, 'id_discount')->dropDownList($discountOptions) ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
]) ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'end')->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
]) ?>
|
||||
|
||||
<?= $form->field($model, 'max_usage_count')->input('number') ?>
|
||||
|
||||
<?= $form->field($model, 'price_brutto')->input('number') ?>
|
||||
|
||||
<?= $form->field($model, 'comment')->textarea(['maxlength' => true]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/ticket', 'Create') : Yii::t('common/ticket', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user