implement registration in backend

This commit is contained in:
Roland Schneider
2018-12-30 23:04:06 +01:00
parent b2bb210cee
commit e3b6bc08a7
32 changed files with 794 additions and 276 deletions

View File

@@ -33,6 +33,7 @@ use yii\helpers\ArrayHelper;
<?= mkTitle("Alkalmak")?>
<?= $form->field($model, 'max_usage_count')->textInput() ?>
<?= $form->field($model, 'max_reservation_count')->textInput() ?>
<?= mkTitle("Érvényességi idő belállítások")?>
<div class="row">

View File

@@ -21,49 +21,54 @@ $this->params['breadcrumbs'][] = $this->title;
</p>
<?php }?>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'name',
[
'attribute' => 'type',
'value' => $model->typeHuman
],
'max_usage_count',
[
'attribute' => 'time_unit_count',
],
[
'attribute' => 'time_unit_type',
'value' => $model->timeUnitHuman
],
'price_brutto',
[
'attribute' => 'id_account',
'value' => $model->accountName,
],
[
'attribute' => 'flag_student',
'value' => ( $model->isStudent() ? Yii::t('common', 'Yes' ) : Yii::t('common', 'No' ) ),
],
[
'attribute' => 'status',
'value' => $model->statusHuman
],
[
'attribute' => 'door_allowed',
'value' => ( $model->isDoor() ? Yii::t('common', 'Yes' ) : Yii::t('common', 'No' ) ),
//'visible' => \common\components\Helper::isTicketTypeDoorAllowedCheckOn()
<?php try {
echo DetailView::widget([
'model' => $model,
'attributes' => [
'name',
[
'attribute' => 'type',
'value' => $model->typeHuman
],
'max_usage_count',
'max_reservation_count',
[
'attribute' => 'time_unit_count',
],
[
'attribute' => 'time_unit_type',
'value' => $model->timeUnitHuman
],
'price_brutto',
[
'attribute' => 'id_account',
'value' => $model->accountName,
],
[
'attribute' => 'flag_student',
'value' => ($model->isStudent() ? Yii::t('common', 'Yes') : Yii::t('common', 'No')),
],
[
'attribute' => 'status',
'value' => $model->statusHuman
],
[
'attribute' => 'door_allowed',
'value' => ($model->isDoor() ? Yii::t('common', 'Yes') : Yii::t('common', 'No')),
//'visible' => \common\components\Helper::isTicketTypeDoorAllowedCheckOn()
],
'created_at:datetime',
'updated_at:datetime',
[
'attribute' => 'installment_enabled',
'value' => ($model->isInstallment() ? Yii::t('common', 'Yes') : Yii::t('common', 'No')),
],
'installment_money',
'installment_count',
],
'created_at:datetime',
'updated_at:datetime',
[
'attribute' => 'installment_enabled',
'value' => ( $model->isInstallment() ? Yii::t('common', 'Yes' ) : Yii::t('common', 'No' ) ),
],
'installment_money',
'installment_count',
],
]) ?>
]);
} catch (Exception $e) {
echo "Failed to render ticket type";
} ?>
</div>