kulcsok új és szerkesztési nézetek fordítása, legördülő lista alkalmazása type-ra
This commit is contained in:
@@ -18,8 +18,9 @@ class KeySearch extends Key
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['id_key', 'status', 'type'], 'integer'],
|
||||
[['number', 'created_at', 'updated_at'], 'safe'],
|
||||
/*[['id_key', 'status', 'type'], 'integer'],
|
||||
[['number', 'created_at', 'updated_at'], 'safe'],*/
|
||||
[['number'], 'safe']
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ use common\models\Key;
|
||||
|
||||
<?= $form->field($model, 'status')->dropDownList( Key::statuses() ) /*->textInput()*/ ?>
|
||||
|
||||
<?= $form->field($model, 'type')->textInput() ?>
|
||||
<?= $form->field($model, 'type')->dropDownList( Key::types() /* array(10=>"kulcs") // <--ez így ok */ ) /* $form->field($model, 'type')->textInput() */ ?>
|
||||
|
||||
<?php //echo $form->field($model, 'created_at')->textInput() ?>
|
||||
|
||||
<?php //echo $form->field($model, 'updated_at')->textInput() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('backend/key', 'Create') : Yii::t('backend/key', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('backend/key', 'Create Save') : Yii::t('backend/key', 'Update Save'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
@@ -10,7 +10,10 @@ use common\models\Key;
|
||||
?>
|
||||
|
||||
<div class="key-search">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
@@ -31,9 +34,11 @@ use common\models\Key;
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('backend/key', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?php echo Html::resetButton(Yii::t('backend/key', 'Reset'), ['class' => 'btn btn-default']); /* Reset gomb */ ?>
|
||||
<?php //echo Html::resetButton(Yii::t('backend/key', 'Reset'), ['class' => 'btn btn-default']); /* Reset gomb */ ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
|
||||
</div><!-- col-md-4 END -->
|
||||
</div><!-- row END -->
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
use common\models\Key;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Key */
|
||||
|
||||
@@ -11,7 +11,7 @@ use common\models\Key;
|
||||
$this->title = Yii::t('backend/key', 'Keys');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="key-index">
|
||||
<div class="key-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); /* ezt megcsinálni hogy csak numberre lehessen itt a fitness-web/backend/views/key/_search.php töltődik be */?>
|
||||
@@ -43,7 +43,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'created_at',
|
||||
// 'updated_at',
|
||||
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {update}',
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use common\models\Key;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Key */
|
||||
|
||||
Reference in New Issue
Block a user