improve customer api & gui
This commit is contained in:
@@ -13,6 +13,7 @@ use yii\widgets\ActiveForm;
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
|
||||
<?= $form->field($model, 'theme')->dropDownList(\common\models\EventType::themes()) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('event-type', 'Create') : Yii::t('event-type', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
|
||||
@@ -26,7 +26,13 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'name',
|
||||
'created_at:datetime',
|
||||
'updated_at:datetime',
|
||||
|
||||
[
|
||||
'attribute' => 'theme',
|
||||
'label' => 'Színtéma',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
return isset($model['theme']) ? "Színtéma " . ($model['theme']+1) : "";
|
||||
}
|
||||
],
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {update}'
|
||||
],
|
||||
|
||||
@@ -30,6 +30,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attributes' => [
|
||||
'id',
|
||||
'name',
|
||||
[
|
||||
'label'=> 'Színtéma',
|
||||
'value' => ( isset($model->theme) ? 'Színtéma ' . ($model->theme+1) : '-' )
|
||||
],
|
||||
'created_at',
|
||||
'updated_at',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user