Skip to content
Snippets Groups Projects
Commit 700677a9 authored by RomanSteinberg's avatar RomanSteinberg
Browse files

FIX: response for invalid email during pass recovery; FIX: press enter during pass recovery

parent da5a9661
Branches
Tags
No related merge requests found
......@@ -81,9 +81,14 @@ class Controller_Handler_Sign extends Controller_Handler {
if(Account::instance()->isMailExists($email))
{
Account::instance()->createRecoveryRequest($this->post->offsetGet('email'));
$response['success'] = true;
}
$response['success'] = true;
else
$response['error'] = 'Пользователь с таким e-mail адресом не зарегистрирован в системе!';
}
else
$response['error'] = 'Введенная строка не является e-mail адресом!';
$this->response->body(json_encode($response));
}
......
......@@ -2,13 +2,11 @@
{% block title %}Активация аккаунта{% endblock %}
{% block forms %}
<div>
{{ sign.input('activation_code', 'text', '', 'Код активации') }}
{{ sign.input('login', 'text', '', 'Логин') }}
{{ sign.input('password', 'password', '', 'Пароль') }}
{{ sign.input('confirm_password', 'password', '', 'Подтверждение пароля') }}
{{ sign.input('email', 'text', '', 'E-Mail адрес') }}
</div>
{{ sign.input('activation_code', 'text', '', 'Код активации') }}
{{ sign.input('login', 'text', '', 'Логин') }}
{{ sign.input('password', 'password', '', 'Пароль') }}
{{ sign.input('confirm_password', 'password', '', 'Подтверждение пароля') }}
{{ sign.input('email', 'text', '', 'E-Mail адрес') }}
{{ sign.input('signup_b', 'button', 'Активировать') }}
<div class='footer'>
{{ HTML.anchor('sign/in', 'Войти в существующий аккаунт')|raw }}
......
......@@ -33,7 +33,7 @@ $(function()
}
else
{
$('#remind').val('Что-то пошло не так :(');
EventInspector_ShowMsg(data.error, "error");
}
});
......@@ -113,6 +113,10 @@ $(function()
{
$('#signin_b').trigger('click');
}
else if($('#email').is(':focus'))
{
$('#email').siblings('input[type=button]').trigger('click');
}
}
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment