Commit d48b9aad0dd95247f1ce2a094d757be1a48b242b
1 parent
b97c2a62
tokar commit
Showing
4 changed files
with
117 additions
and
26 deletions
Show diff stats
frontend/views/site/forms-modal-login.php
| @@ -22,12 +22,18 @@ use yii\helpers\Url; | @@ -22,12 +22,18 @@ use yii\helpers\Url; | ||
| 22 | 'id' => 'login-form', | 22 | 'id' => 'login-form', |
| 23 | ], | 23 | ], |
| 24 | ]); ?> | 24 | ]); ?> |
| 25 | - <?php echo $form->field(new LoginForm(), 'username', [ 'template' => "{label}\n{input}\n{error}" ]) | ||
| 26 | - ->label('Логин') | ||
| 27 | - ->textInput (['class'=> 'custom-input-2']); ?> | ||
| 28 | - <?php echo $form->field(new LoginForm(), 'password', [ 'template' => "{label}\n{input}\n{error}" ]) | ||
| 29 | - ->label('Пароль') | ||
| 30 | - ->textInput (['class'=> 'custom-input-2','type'=>'password']); ?> | 25 | + <div class="input-blocks-wrapper"> |
| 26 | + <?php echo $form->field(new LoginForm(), 'username', [ 'template' => "{label}\n{input}\n{error}" ]) | ||
| 27 | + ->label('Логин') | ||
| 28 | + ->textInput (['class'=> 'custom-input-2']); ?> | ||
| 29 | + </div> | ||
| 30 | + | ||
| 31 | + <div class="input-blocks-wrapper"> | ||
| 32 | + <?php echo $form->field(new LoginForm(), 'password', [ 'template' => "{label}\n{input}\n{error}" ]) | ||
| 33 | + ->label('Пароль') | ||
| 34 | + ->textInput (['class'=> 'custom-input-2','type'=>'password']); ?> | ||
| 35 | + </div> | ||
| 36 | + | ||
| 31 | <div class="login-check-remember"> | 37 | <div class="login-check-remember"> |
| 32 | <?php echo $form->field(new LoginForm(), 'rememberMe', [ 'template' => "{input}\n{label}\n{error}" ]) | 38 | <?php echo $form->field(new LoginForm(), 'rememberMe', [ 'template' => "{input}\n{label}\n{error}" ]) |
| 33 | ->label('<span></span>Запомнить меня') | 39 | ->label('<span></span>Запомнить меня') |
frontend/views/site/login.php
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | * @var yii\widgets\ActiveForm $form | 8 | * @var yii\widgets\ActiveForm $form |
| 9 | * @var LoginForm $model | 9 | * @var LoginForm $model |
| 10 | */ | 10 | */ |
| 11 | - $this->title = 'Login'; | 11 | + $this->title = 'Авторизация'; |
| 12 | $this->params[ 'breadcrumbs' ][] = $this->title; | 12 | $this->params[ 'breadcrumbs' ][] = $this->title; |
| 13 | ?> | 13 | ?> |
| 14 | <h1><?php echo Html::encode($this->title); ?></h1> | 14 | <h1><?php echo Html::encode($this->title); ?></h1> |
| @@ -22,11 +22,11 @@ | @@ -22,11 +22,11 @@ | ||
| 22 | } | 22 | } |
| 23 | ?> | 23 | ?> |
| 24 | 24 | ||
| 25 | - <p class="lead">Do you already have an account on one of these sites? Click the logo to log in with it here:</p> | ||
| 26 | -<?php echo \nodge\eauth\Widget::widget([ 'action' => 'site/login' ]); ?> | ||
| 27 | - <hr/> | ||
| 28 | 25 | ||
| 29 | - <p>Please fill out the following fields to login:</p> | 26 | +<?php //echo \nodge\eauth\Widget::widget([ 'action' => 'site/login' ]); ?> |
| 27 | + | ||
| 28 | + | ||
| 29 | + | ||
| 30 | 30 | ||
| 31 | <?php $form = ActiveForm::begin([ | 31 | <?php $form = ActiveForm::begin([ |
| 32 | 'options' => [ | 32 | 'options' => [ |
| @@ -38,8 +38,13 @@ | @@ -38,8 +38,13 @@ | ||
| 38 | ->textInput(); ?> | 38 | ->textInput(); ?> |
| 39 | <?php echo $form->field($model, 'password') | 39 | <?php echo $form->field($model, 'password') |
| 40 | ->passwordInput(); ?> | 40 | ->passwordInput(); ?> |
| 41 | -<?php echo $form->field($model, 'rememberMe') | ||
| 42 | - ->checkbox(); ?> | 41 | +<?php echo $form->field($model, 'rememberMe', [ 'template' => "{input}\n{label}\n{error}" ]) |
| 42 | + ->label('<span></span>Запомнить меня') | ||
| 43 | + ->checkbox([ | ||
| 44 | + 'class' => 'custom-check', | ||
| 45 | + 'checked' => 'checked', | ||
| 46 | + ], false); ?> | ||
| 47 | + | ||
| 43 | <div class="form-actions"> | 48 | <div class="form-actions"> |
| 44 | <?php echo Html::submitButton('Login', [ 'class' => 'btn btn-primary' ]); ?> | 49 | <?php echo Html::submitButton('Login', [ 'class' => 'btn btn-primary' ]); ?> |
| 45 | </div> | 50 | </div> |
frontend/views/site/requestPasswordResetToken.php
| @@ -7,29 +7,44 @@ | @@ -7,29 +7,44 @@ | ||
| 7 | use yii\helpers\Html; | 7 | use yii\helpers\Html; |
| 8 | use yii\bootstrap\ActiveForm; | 8 | use yii\bootstrap\ActiveForm; |
| 9 | 9 | ||
| 10 | -$this->title = 'Заброс на сброс пароля'; | 10 | +$this->title = 'Запрос на восстановление пароля'; |
| 11 | $this->params['breadcrumbs'][] = $this->title; | 11 | $this->params['breadcrumbs'][] = $this->title; |
| 12 | ?> | 12 | ?> |
| 13 | -<div class="box-wr"> | ||
| 14 | - <div class="box-all"> | 13 | +<div class="box-wr" style="width: 600px"> |
| 14 | + <div class="box-all" style="width: 600px"> | ||
| 15 | <div class="site-request-password-reset"> | 15 | <div class="site-request-password-reset"> |
| 16 | - <h1><?= Html::encode($this->title) ?></h1> | 16 | + <div class="site-request-password-title style"><?= Html::encode($this->title) ?></div> |
| 17 | 17 | ||
| 18 | - <p>Please fill out your email. A link to reset password will be sent there.</p> | 18 | + <div class="site-request-password-help style">Для восстановления пароля введите email, который Вы использовали при регистрации. Из соображений безопасности мы высылаем не пароль, заданный при регистрации, а письмо со специальной ссылкой, пройдя по которой вы сможете задать новый пароль для доступа к панели управления.</div> |
| 19 | 19 | ||
| 20 | - <div class="row"> | ||
| 21 | - <div class="col-lg-5"> | ||
| 22 | - <?php $form = ActiveForm::begin(['id' => 'request-password-reset-form']); ?> | ||
| 23 | 20 | ||
| 24 | - <?= $form->field($model, 'email') ?> | ||
| 25 | 21 | ||
| 26 | - <div class="form-group"> | ||
| 27 | - <?= Html::submitButton('Send', ['class' => 'btn btn-primary']) ?> | 22 | + |
| 23 | + <?php $form = ActiveForm::begin(['id' => 'request-password-reset-form']); ?> | ||
| 24 | + <div class="input-blocks-wrapper"> | ||
| 25 | + <div style="width: 300px;margin: 0 auto"> | ||
| 26 | + <div class="input-blocks"> | ||
| 27 | + <?= $form->field($model, 'email', [ 'template' => "{label}\n{input}\n{error}" ]) | ||
| 28 | + ->label() | ||
| 29 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 30 | + ?> | ||
| 28 | </div> | 31 | </div> |
| 32 | + </div> | ||
| 33 | + </div> | ||
| 29 | 34 | ||
| 30 | - <?php ActiveForm::end(); ?> | 35 | + <div class="input-blocks-wrapper" style="margin-top: 20px; margin-bottom: 50px"> |
| 36 | + <div style="width: 300px;margin: 0 auto"> | ||
| 37 | + <div class="form-group"> | ||
| 38 | + <?= Html::submitButton('Отправить', ['class' => 'btn btn-primary login-button']) ?> | ||
| 39 | + </div> | ||
| 31 | </div> | 40 | </div> |
| 41 | + | ||
| 32 | </div> | 42 | </div> |
| 43 | + | ||
| 44 | + | ||
| 45 | + <?php ActiveForm::end(); ?> | ||
| 46 | + | ||
| 47 | + | ||
| 33 | </div> | 48 | </div> |
| 34 | </div> | 49 | </div> |
| 35 | </div> | 50 | </div> |
frontend/web/css/style.css
| @@ -5335,7 +5335,72 @@ top: 272px; | @@ -5335,7 +5335,72 @@ top: 272px; | ||
| 5335 | margin-top: 6px; | 5335 | margin-top: 6px; |
| 5336 | margin-bottom: 60px; | 5336 | margin-bottom: 60px; |
| 5337 | } | 5337 | } |
| 5338 | - | 5338 | +.form-resume-wr .required:before, .site-request-password-reset .required:before{ |
| 5339 | + display: block; | ||
| 5340 | + content: "*"; | ||
| 5341 | + color: #D40000; | ||
| 5342 | + position: absolute; | ||
| 5343 | + top: 32px; | ||
| 5344 | + left: -15px; | ||
| 5345 | + width: 15px; | ||
| 5346 | +} | ||
| 5347 | +.site-request-password-reset .required:before{ | ||
| 5348 | + left: 125px; | ||
| 5349 | +} | ||
| 5350 | +.form-resume-wr .help-block { | ||
| 5351 | + width: 320px; | ||
| 5352 | + margin: 0; | ||
| 5353 | + text-align: center; | ||
| 5354 | + position: absolute; | ||
| 5355 | + top: 12px; | ||
| 5356 | + left: 265px; | ||
| 5357 | + border: 1px solid #c1c1c1; | ||
| 5358 | + box-shadow: 3px 3px 7px 0 rgba(200, 200, 200, .5), inset 0 -3px 0 0 #c1c1c1; | ||
| 5359 | + padding: 15px 0; | ||
| 5360 | + display: none; | ||
| 5361 | +} | ||
| 5362 | +.form-resume-wr .has-error .help-block { | ||
| 5363 | + display: block; | ||
| 5364 | + color: inherit; | ||
| 5365 | + background: #fff; | ||
| 5366 | +} | ||
| 5367 | +.form-resume-wr .help-block:before { | ||
| 5368 | + width: 20px; | ||
| 5369 | + height: 20px; | ||
| 5370 | + background: #fff; | ||
| 5371 | + border: 1px solid #c1c1c1; | ||
| 5372 | + transform: rotate(45deg); | ||
| 5373 | + position: absolute; | ||
| 5374 | + top: 50%; | ||
| 5375 | + left: -2px; | ||
| 5376 | + margin-top: -10px; | ||
| 5377 | +} | ||
| 5378 | +.form-resume-wr .help-block:after { | ||
| 5379 | + height: 20px; | ||
| 5380 | + background: #fff; | ||
| 5381 | + transform: rotate(45deg); | ||
| 5382 | + position: absolute; | ||
| 5383 | + left: 0px !important; | ||
| 5384 | + top: 50% !important; | ||
| 5385 | + margin-top: -10px !important; | ||
| 5386 | + background: #fff !important; | ||
| 5387 | + border: 1px solid #fff !important; | ||
| 5388 | +} | ||
| 5389 | +#modal_form_login .form-resume-wr {overflow: visible} | ||
| 5390 | +.site-request-password-title { | ||
| 5391 | + font-size: 28px; | ||
| 5392 | + text-align: center; | ||
| 5393 | + margin-top: 20px; | ||
| 5394 | + font-weight: 700; | ||
| 5395 | +} | ||
| 5396 | +.site-request-password-help { | ||
| 5397 | + font-size: 13px; | ||
| 5398 | + color: #b7b7b7; | ||
| 5399 | + line-height: 18px; | ||
| 5400 | + text-align: center; | ||
| 5401 | + margin-top: 10px; | ||
| 5402 | +} | ||
| 5403 | +.site-request-password-reset {} | ||
| 5339 | 5404 | ||
| 5340 | 5405 | ||
| 5341 | 5406 |