implement ticket_type comment in frontend/backend
This commit is contained in:
parent
8d98f510d1
commit
176d42ea76
@ -31,6 +31,9 @@ use yii\helpers\ArrayHelper;
|
|||||||
|
|
||||||
<?= $form->field($model, 'type')->dropDownList(TicketType::ticketTypes() ) ?>
|
<?= $form->field($model, 'type')->dropDownList(TicketType::ticketTypes() ) ?>
|
||||||
|
|
||||||
|
<?= mkTitle("Megjegyzés")?>
|
||||||
|
<?= $form->field($model, 'comment')->textInput()->label("Megjegyzés") ?>
|
||||||
|
|
||||||
<?= mkTitle("Alkalmak")?>
|
<?= mkTitle("Alkalmak")?>
|
||||||
<?= $form->field($model, 'max_usage_count')->textInput() ?>
|
<?= $form->field($model, 'max_usage_count')->textInput() ?>
|
||||||
<?= $form->field($model, 'max_reservation_count')->textInput() ?>
|
<?= $form->field($model, 'max_reservation_count')->textInput() ?>
|
||||||
|
|||||||
@ -31,6 +31,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'value' => $model->typeHuman
|
'value' => $model->typeHuman
|
||||||
],
|
],
|
||||||
'max_usage_count',
|
'max_usage_count',
|
||||||
|
[
|
||||||
|
'attribute' => 'comment',
|
||||||
|
'label' => "Megjegyzés"
|
||||||
|
],
|
||||||
'max_reservation_count',
|
'max_reservation_count',
|
||||||
[
|
[
|
||||||
'attribute' => 'time_unit_count',
|
'attribute' => 'time_unit_count',
|
||||||
|
|||||||
@ -128,7 +128,7 @@ class TicketType extends BaseFitnessActiveRecord
|
|||||||
////////////////
|
////////////////
|
||||||
[['door_allowed',], 'integer'],
|
[['door_allowed',], 'integer'],
|
||||||
[['door_allowed',], 'in', 'range' => [ self::FLAG_DOOR_ALLOWED_OFF, self::FLAG_DOOR_ALLOWED_ON ]],
|
[['door_allowed',], 'in', 'range' => [ self::FLAG_DOOR_ALLOWED_OFF, self::FLAG_DOOR_ALLOWED_ON ]],
|
||||||
|
[['comment'], 'string' ],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,15 @@ use common\components\Helper;
|
|||||||
$accountOptions = HtmlHelper::mkAccountOptions($accounts);
|
$accountOptions = HtmlHelper::mkAccountOptions($accounts);
|
||||||
$discountOptions = ['' => ''] + HtmlHelper::mkDiscountOptions($discounts, [ 'emptyOption' => true] );
|
$discountOptions = ['' => ''] + HtmlHelper::mkDiscountOptions($discounts, [ 'emptyOption' => true] );
|
||||||
$ticketTypeOptions = HtmlHelper::mkTicketTypeOptions($ticketTypes);
|
$ticketTypeOptions = HtmlHelper::mkTicketTypeOptions($ticketTypes);
|
||||||
|
$ticketTypeOptions = [];
|
||||||
|
foreach ($ticketTypes as $ticketType){
|
||||||
|
$comment = "";
|
||||||
|
if ( isset($ticketType->comment)){
|
||||||
|
$comment = " (" . $ticketType->comment .")";
|
||||||
|
}
|
||||||
|
$ticketTypeOptions[$ticketType->id_ticket_type] = $ticketType->name . $comment;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// echo "default kassza: " . Account::readDefault();
|
// echo "default kassza: " . Account::readDefault();
|
||||||
// echo " kassza: " . $model->id_account;
|
// echo " kassza: " . $model->id_account;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user