Commit a486036755795b70a00a348e0553d0cda9fa8c26
Merge branch 'master' of gitlab.artweb.com.ua:root/test_1
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
backend/views/accounts/_form.php
@@ -36,7 +36,7 @@ use yii\helpers\ArrayHelper; | @@ -36,7 +36,7 @@ use yii\helpers\ArrayHelper; | ||
36 | 36 | ||
37 | <?= $form->field($model, 'comment')->textarea(['rows' => 6]) ?> | 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 | <?= $form->field($model, 'is_active')->checkbox() ?> | 41 | <?= $form->field($model, 'is_active')->checkbox() ?> |
42 | 42 |
common/models/Accounts.php
@@ -75,7 +75,7 @@ class Accounts extends \yii\db\ActiveRecord | @@ -75,7 +75,7 @@ class Accounts extends \yii\db\ActiveRecord | ||
75 | { | 75 | { |
76 | return [ | 76 | return [ |
77 | [['if_manager', 'margin_id', 'country', 'city', 'rating', 'is_active', 'is_firm', 'office_id', 'is_scribe', 'set_manager_id', 'car', 'mod', 'deliveries', 'scode'], 'integer'], | 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 | [['comment'], 'string'], | 79 | [['comment'], 'string'], |
80 | [['balance'], 'number'], | 80 | [['balance'], 'number'], |
81 | [['email', 'name','surname', 'firm_site'], 'string', 'max' => 150], | 81 | [['email', 'name','surname', 'firm_site'], 'string', 'max' => 150], |
@@ -88,6 +88,7 @@ class Accounts extends \yii\db\ActiveRecord | @@ -88,6 +88,7 @@ class Accounts extends \yii\db\ActiveRecord | ||
88 | [['email'], 'email'], | 88 | [['email'], 'email'], |
89 | ['re_pass', 'compare', 'compareAttribute' => 'pass'], | 89 | ['re_pass', 'compare', 'compareAttribute' => 'pass'], |
90 | ['verifyCode', 'captcha'], | 90 | ['verifyCode', 'captcha'], |
91 | + ['dt', 'date', 'format' => 'Y.m.d'] | ||
91 | ]; | 92 | ]; |
92 | } | 93 | } |
93 | 94 |