_form.php
3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\Accounts */
/* @var $form yii\widgets\ActiveForm */
?>
<div ng-controller="SampleAppCtrl" class="Accounts-form">
<?php $form = ActiveForm::begin(); ?>
<div >
<button ng-repeat="item in buttons" ng-click="ShowMe(item)" type="button" ng-class="item.status ? 'btn btn-primary btn-lg active' : 'btn btn-default btn-lg'" class=>{{item.data}}</button>
</div>
<div ng-show="buttons[0].status" >
<?= $form->field($model, 'if_manager')->checkbox() ?>
<?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'phones')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'pass')->passwordInput(['maxlength' => true]) ?>
<?= $form->field($model, 'phones2')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'phones3')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'city')->dropDownList(ArrayHelper::map($cities, 'id', 'name'), ['prompt' => 'Выберие город']) ?>
<?= $form->field($model, 'address')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'comment')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'dt')->textInput(['maxlength' => true,'value'=>date('Y.m.d')]) ?>
<?= $form->field($model, 'is_active')->checkbox() ?>
<?= $form->field($model, 'is_scribe')->checkbox() ?>
<?= $form->field($model, 'margin_id')->dropDownList(ArrayHelper::map($margin, 'id', 'name'), ['prompt' => 'Выберие Тип цены']) ?>
<?= $form->field($model, 'set_manager_id')->dropDownList(ArrayHelper::map($users, 'id', 'name'), ['prompt' => 'Выберие Персонального менеджера']) ?>
<?= $form->field($model, 'scode')->textInput() ?>
</div>
<div ng-show="buttons[1].status">
<?= $form->field($model, 'is_firm')->textInput() ?>
<?= $form->field($model, 'company')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_inn')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_bank')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_ur_adr')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_fiz_adr')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_code_eg')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_rs')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_mfo')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'firm_site')->textInput(['maxlength' => true]) ?>
</div>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>