diff --git a/common/models/UserInfo.php b/common/models/UserInfo.php index b2314a5..520681f 100755 --- a/common/models/UserInfo.php +++ b/common/models/UserInfo.php @@ -142,12 +142,18 @@ [ 'busy', 'member', + ], + 'boolean', + ], + [ + [ 'contract', 'estimate', 'purchase', 'delivery', ], - 'boolean', + 'string', + 'max' => 50, ], [ [ @@ -230,7 +236,7 @@ ], 'filter', 'filter' => function($value) { - if(empty($value)) { + if(empty( $value )) { return $value; } if(!preg_match('/^https?:\/{2}.*$/', $value)) { diff --git a/console/migrations/m160325_085819_user_info_radio.php b/console/migrations/m160325_085819_user_info_radio.php new file mode 100644 index 0000000..5b3c6a0 --- /dev/null +++ b/console/migrations/m160325_085819_user_info_radio.php @@ -0,0 +1,30 @@ +dropColumn('{{%user_info}}', 'contract'); + $this->dropColumn('{{%user_info}}', 'estimate'); + $this->dropColumn('{{%user_info}}', 'purchase'); + $this->dropColumn('{{%user_info}}', 'delivery'); + $this->addColumn('{{%user_info}}', 'contract', $this->string(50)); + $this->addColumn('{{%user_info}}', 'estimate', $this->string(50)); + $this->addColumn('{{%user_info}}', 'purchase', $this->string(50)); + $this->addColumn('{{%user_info}}', 'delivery', $this->string(50)); + } + + public function down() + { + $this->dropColumn('{{%user_info}}', 'contract'); + $this->dropColumn('{{%user_info}}', 'estimate'); + $this->dropColumn('{{%user_info}}', 'purchase'); + $this->dropColumn('{{%user_info}}', 'delivery'); + $this->addColumn('{{%user_info}}', 'contract', $this->smallInteger()); + $this->addColumn('{{%user_info}}', 'estimate', $this->smallInteger()); + $this->addColumn('{{%user_info}}', 'purchase', $this->smallInteger()); + $this->addColumn('{{%user_info}}', 'delivery', $this->smallInteger()); + } +} diff --git a/frontend/views/accounts/employment.php b/frontend/views/accounts/employment.php index 9c8c776..a9af519 100755 --- a/frontend/views/accounts/employment.php +++ b/frontend/views/accounts/employment.php @@ -208,9 +208,6 @@ $( function() { - $(document).on('change', '.no-client-validation', function() { - $(this).parent().find('.help-block').hide(); - }); var regexp = /^[\w]+\[(\d+)\].*$/; var prevEmploy = $('.prev_job_inputs').length if(prevEmploy < 1) diff --git a/frontend/views/accounts/general.php b/frontend/views/accounts/general.php index 7c7b0dc..210183f 100755 --- a/frontend/views/accounts/general.php +++ b/frontend/views/accounts/general.php @@ -98,7 +98,7 @@