Merge branch '89-restore-password' into 'dev'
Resolve "Восстановление пароля" Closes #89 See merge request romanov73/ng-tracker!101environments/staging/deployments/68
commit
d4364b9767
@ -0,0 +1,3 @@
|
||||
.loader {
|
||||
padding-left:50%
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 673 B |
@ -1,57 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default">
|
||||
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script src="/js/users.js"></script>
|
||||
<link rel="stylesheet" href="../css/base.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<nav layout:fragment="navbar">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="/"><span class="ui-menuitem-text"><i
|
||||
class="fa fa-plane fa-4" aria-hidden="true"></i> Balance</span></a>
|
||||
class="fa fa-plane fa-4" aria-style="display:none"></i> Balance</span></a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container" layout:fragment="content">
|
||||
<form id="reset-form" method="post" class="margined-top-10">
|
||||
<fieldset>
|
||||
<div layout:fragment="content">
|
||||
<section class="bg-light" id="portfolio">
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<input type="text" name="email" id="emailReset" class="form-control"
|
||||
placeholder="E-Mail"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="email" name="email" id="email" class="form-control"
|
||||
placeholder="E-Mail" required="true" autofocus="autofocus"/>
|
||||
<input type="password" name="email" id="passwordNew" class="form-control"
|
||||
placeholder="Новый пароль" style="display:none"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success btn-block">Сбросить пароль</button>
|
||||
<div class="form-group">
|
||||
<input type="password" name="email" id="passwordConfirm" class="form-control"
|
||||
placeholder="Подтвердите пароль" style="display:none"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" name="email" id="resetKey" class="form-control"
|
||||
placeholder="Код подтверждения" style="display:none"/>
|
||||
</div>
|
||||
<div id="dvloader" class="loader" style="display:none"><img src="../img/main/ajax-loader.gif" /></div>
|
||||
<button id="btnSend" type="button" onclick="requestResetPassword()"
|
||||
class="btn btn-success btn-block">
|
||||
Отправить код подтверждения
|
||||
</button>
|
||||
<button id="btnReset" style="display:none" type="button" onclick="resetPassword()"
|
||||
class="btn btn-success btn-block">
|
||||
Сбросить
|
||||
пароль
|
||||
</button>
|
||||
<div class="form-group">
|
||||
<small class="form-text text-muted">
|
||||
<a href="/login">Вернуться к странице входа</a>
|
||||
</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<th:block layout:fragment="data-scripts">
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
$(document).ready(function () {
|
||||
$("#reset-form").submit(function () {
|
||||
var email = $("#email").val();
|
||||
if (isEmpty(email)) {
|
||||
showFeedbackMessage("Адрес электронной почты не задан", MessageTypesEnum.DANGER);
|
||||
return false;
|
||||
}
|
||||
postToRest(urlUsersPasswordResetRequest + "?email=" + email, null,
|
||||
function () {
|
||||
showFeedbackMessage("Запрос на смену пароля отправлен");
|
||||
},
|
||||
function () {
|
||||
$("#email").val("");
|
||||
}
|
||||
);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
/*]]>*/
|
||||
|
||||
</script>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue