implement ticket_type comment in frontend/backend

This commit is contained in:
Schneider Roland
2023-03-09 19:05:28 +01:00
parent 8d98f510d1
commit 176d42ea76
4 changed files with 73 additions and 57 deletions

View File

@@ -9,7 +9,7 @@ use yii\helpers\ArrayHelper;
/* @var $model common\models\TicketType */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
<?php
function mkTitle($name){
$s = "";
$tag = "h4";
@@ -25,12 +25,15 @@ use yii\helpers\ArrayHelper;
<div class="ticket-type-form">
<?php $form = ActiveForm::begin(); ?>
<?= mkTitle("Általános")?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'type')->dropDownList(TicketType::ticketTypes() ) ?>
<?= mkTitle("Megjegyzés")?>
<?= $form->field($model, 'comment')->textInput()->label("Megjegyzés") ?>
<?= mkTitle("Alkalmak")?>
<?= $form->field($model, 'max_usage_count')->textInput() ?>
<?= $form->field($model, 'max_reservation_count')->textInput() ?>
@@ -53,7 +56,7 @@ use yii\helpers\ArrayHelper;
<?= $form->field($model, 'id_account')->dropDownList($account_options) ?>
<?= mkTitle("További beállítások")?>
<?= $form->field($model, 'status')->checkbox( ['value' => 10, 'label' => Yii::t('common/ticket_type', "Active") ]) ?>
<?= $form->field($model, 'flag_student')->checkbox( ['value' => 1, 'label' => Yii::t('common/ticket_type', "Student") ]) ?>

View File

@@ -31,6 +31,10 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => $model->typeHuman
],
'max_usage_count',
[
'attribute' => 'comment',
'label' => "Megjegyzés"
],
'max_reservation_count',
[
'attribute' => 'time_unit_count',