add city, customer and card model + crud
This commit is contained in:
60
backend/views/card/_search.php
Normal file
60
backend/views/card/_search.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use common\models\Card;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\models\CardSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
<?php
|
||||
|
||||
function mkOptions($options){
|
||||
|
||||
$all = ['' => Yii::t('common/product','All' ) ];
|
||||
|
||||
$o = $all + $options;
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
$typeOptions = mkOptions(Card::types());
|
||||
$statusOptions = mkOptions(Card::statuses());
|
||||
|
||||
|
||||
?>
|
||||
<div class="card-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'number') ?>
|
||||
</div>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'status')->dropDownList($statusOptions) ?>
|
||||
</div>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'type')->dropDownList($typeOptions) ?>
|
||||
</div>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'searchCustomerName')->textInput() ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/card', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user