Commit 525124bc by aa.gusti

password-reset

1 parent 6d7a4c38
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" <html lang="en"
tal:define="home request.route_url('home');"> tal:define="home request.route_url('home')[:-1];">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
...@@ -10,22 +10,22 @@ ...@@ -10,22 +10,22 @@
<meta tal:condition="request.google_signin_client_id" <meta tal:condition="request.google_signin_client_id"
name="google-signin-client_id" name="google-signin-client_id"
content="${request.google_signin_client_id}"> content="${request.google_signin_client_id}">
<link rel="shortcut icon" href="${home}static/img/favicon.png"> <link rel="shortcut icon" href="${home}/static/img/favicon.png">
<title tal:content="request.title" /> <title tal:content="request.title" />
<!-- Basic Styles --> <!-- Basic Styles -->
<link rel="stylesheet" type="text/css" media="screen" href="${home}static/v3/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="${home}static/v3/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/font-awesome.min.css">
<!-- SmartAdmin Styles : Caution! DO NOT change the order --> <!-- SmartAdmin Styles : Caution! DO NOT change the order -->
<link rel="stylesheet" type="text/css" media="screen" href="${home}static/v3/css/smartadmin-production-plugins.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-production-plugins.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="${home}static/v3/css/smartadmin-production.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-production.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="${home}static/v3/css/smartadmin-skins.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-skins.min.css">
<!-- SmartAdmin RTL Support --> <!-- SmartAdmin RTL Support -->
<link rel="stylesheet" type="text/css" media="screen" href="${home}static/v3/css/smartadmin-rtl.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-rtl.min.css">
<link rel="stylesheet" type="text/css" href="${home}static/css/custom.css"> <link rel="stylesheet" type="text/css" href="${home}/static/css/custom.css">
</head> </head>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</div> </div>
<div class="col-md-12" align="center"> <div class="col-md-12" align="center">
<img src="${home}static/img/logo.png" <img src="${home}/static/img/logo.png"
class="img-float img-thumbnail" style="height:auto;width:auto;border:none;"/> class="img-float img-thumbnail" style="height:auto;width:auto;border:none;"/>
</div> </div>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<b class="tooltip tooltip-top-right"><i class="fa fa-lock txt-color-teal"></i> ISI DENGAN PASSWORD ANDA</b> </label> <b class="tooltip tooltip-top-right"><i class="fa fa-lock txt-color-teal"></i> ISI DENGAN PASSWORD ANDA</b> </label>
<div class="note"> <div class="note">
<a id="lupa" name="lupa" <a id="lupa" name="lupa"
href="/reset-password">Lupa Password?</a> href="${home}/reset-password">Lupa Password?</a>
</div> </div>
</section> </section>
<section> <section>
...@@ -118,9 +118,9 @@ ...@@ -118,9 +118,9 @@
<!-- Bootstrap core JavaScript <!-- Bootstrap core JavaScript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="/deform_static/scripts/jquery-2.0.3.min.js"></script> <script type="text/javascript" src="${home}/deform_static/scripts/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="/deform_static/scripts/bootstrap.min.js"></script> <script type="text/javascript" src="${home}/deform_static/scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="/deform_static/scripts/deform.js"></script> <script type="text/javascript" src="${home}/deform_static/scripts/deform.js"></script>
<script tal:condition="request.google_signin_client_id" <script tal:condition="request.google_signin_client_id"
src="https://apis.google.com/js/platform.js" async defer></script> src="https://apis.google.com/js/platform.js" async defer></script>
<script tal:condition="request.google_signin_client_id"> <script tal:condition="request.google_signin_client_id">
......
...@@ -332,8 +332,9 @@ def regenerate_security_code(user): ...@@ -332,8 +332,9 @@ def regenerate_security_code(user):
@view_config(route_name='reset-password', renderer='templates/reset-password.pt') @view_config(route_name='reset-password', renderer='templates/reset-password.pt')
def view_reset_password(request): def view_reset_password(request):
if request.authenticated_userid(request): if request.authenticated_userid:
return HTTPFound(location=f"{request.route_url('home')}") return HTTPFound(location=f"{request.route_url('home')}")
resp = dict(title=_('Reset password')) resp = dict(title=_('Reset password'))
schema = ResetPassword(validator=reset_password_validator) schema = ResetPassword(validator=reset_password_validator)
btn_submit = Button('submit', _('Send password reset email')) btn_submit = Button('submit', _('Send password reset email'))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!