Регистрация
field($model, 'username') ->textInput([ 'class' => 'custom-input-2' ]) ?>
Логин должен содержать не менее 3-х символов, начинаться с английской буквы и заканчиваться буквой или цифрой. Допускаются английские буквы, цифры и знаки 'тире', 'подчеркивание', 'точка'
field($model, 'password') ->passwordInput([ 'class' => 'custom-input-2' ]) ?>
Пароль должен содержать не менее 6-ти символов.
field($model, 'email') ->textInput([ 'class' => 'custom-input-2' ]) ?>
На этот адрес электронной почты будет отправлено уведомление о регистрации.
Кто Вы
type = '1'; echo $form->field($model, 'type', [ 'options' => [ 'class' => 'check-radio-wr' ] ]) ->label(false) ->radioList([ 1 => 'Частное лицо', 2 => 'Компания', ], [ 'item' => function($index, $label, $name, $checked, $value) { $return = '
'; $return .= ''; $return .= ''; $return .= '
'; return $return; }, ]); ?>
field($model, 'is_freelancer', [ 'template' => "{input}\n{label}\n{error}", 'options' => [ 'class' => 'custom-form-buttons' ], ]) ->label('Я - Фрилансер') ->checkbox([ 'class' => 'custom-check', ], false); ?> field($model, 'is_customer', [ 'template' => "{input}\n{label}\n{error}", 'options' => [ 'class' => 'custom-form-buttons' ], ]) ->label('Я - Заказчик') ->checkbox([ 'class' => 'custom-check', ], false); ?>
field($model, 'name') ->textInput([ 'class' => 'custom-input-2' ]) ?>
field($model, 'firstname') ->textInput([ 'class' => 'custom-input-2' ]) ?>
field($model, 'lastname') ->textInput([ 'class' => 'custom-input-2' ]) ?>
field($model, 'city') ->widget(Select2::classname(), [ 'options' => [ 'placeholder' => 'Выбор города ...' ], 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'ajax' => [ 'url' => \yii\helpers\Url::to([ 'site/city' ]), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }'), ], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(city) { return city.text; }'), 'templateSelection' => new JsExpression('function (city) { return city.text; }'), ], ]); ?>
field($model, 'city_custom', [ 'options' => [ 'class' => 'input-blocks' ] ]) ->label('Город не в списке') ->textInput([ 'class' => 'custom-input-2' ]) ?>
Если вашего города нет в списке, введите его.
field($model, 'verifyCode') ->widget(Captcha::className(), [ 'options' => [ 'class' => 'custom-input-2' ], 'template' => '
{image}
{input}
', ]) ->label(false) ?>
registerJS($js); ?>