Commit a486036755795b70a00a348e0553d0cda9fa8c26

Authored by Mihail
2 parents 59eedf0c 313fb9a2

Merge branch 'master' of gitlab.artweb.com.ua:root/test_1

backend/views/accounts/_form.php
... ... @@ -36,7 +36,7 @@ use yii\helpers\ArrayHelper;
36 36  
37 37 <?= $form->field($model, 'comment')->textarea(['rows' => 6]) ?>
38 38  
39   - <?= $form->field($model, 'dt')->textInput(['maxlength' => true]) ?>
  39 + <?= $form->field($model, 'dt')->textInput(['maxlength' => true,'value'=>date('Y.m.d')]) ?>
40 40  
41 41 <?= $form->field($model, 'is_active')->checkbox() ?>
42 42  
... ...
common/models/Accounts.php
... ... @@ -75,7 +75,7 @@ class Accounts extends \yii\db\ActiveRecord
75 75 {
76 76 return [
77 77 [['if_manager', 'margin_id', 'country', 'city', 'rating', 'is_active', 'is_firm', 'office_id', 'is_scribe', 'set_manager_id', 'car', 'mod', 'deliveries', 'scode'], 'integer'],
78   - [['company','email', 'pass', 'name','surname', 'phones', 'comment', 'dt', 'set_manager_id'], 'required'],
  78 + [['email', 'pass', 'name','surname', 'phones',], 'required'],
79 79 [['comment'], 'string'],
80 80 [['balance'], 'number'],
81 81 [['email', 'name','surname', 'firm_site'], 'string', 'max' => 150],
... ... @@ -88,6 +88,7 @@ class Accounts extends \yii\db\ActiveRecord
88 88 [['email'], 'email'],
89 89 ['re_pass', 'compare', 'compareAttribute' => 'pass'],
90 90 ['verifyCode', 'captcha'],
  91 + ['dt', 'date', 'format' => 'Y.m.d']
91 92 ];
92 93 }
93 94  
... ...