Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
{% for src in js %}
<script type="text/javascript" src="{{ src }}"></script>
{% endfor %}
{% for src in css %}
<link type="text/css" rel="stylesheet" href="{{ src }}">
{% endfor %}
<link type="text/css" rel="stylesheet" href="{{ url_for( 'send_app_files', path = 'app.css' ) }}">
<script type="text/javascript">
baseurl = "{{ baseurl }}";
var reset_password = async function()
{
var email = $( '#email' ).val();
email = email.toLowerCase();
$.ajax( {
url: '{{ url_for( 'do_password_reset' ) }}',
dataType: 'json',
method: 'POST',
data: {
email: email
},
success: function( data )
{
if( ! data.error )
{
toastr.success( "Password reset request successully" );
/* setTimeout( function()
{
location.href = "{{ url_for( 'home' ) }}";
}, 1000 ); */
}
}
} );
}
</script>
</head>
<body>
<h1 style="margin-bottom: 0px">ICNML</h1>
<h4 style="margin-top: 0px">International Close Non-Matches Library</h4>
<div class="ui-widget-header ui-corner-top icnml_box_top">Password reset form</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div id="icnml_box_fields" class="icnml_box_fields">
<div style="text-align: right;">
<label for="email">E-Mail address</label>
</div>
<div>
<input id="email" name="email" type="text">
</div>
</div>
<div class="icnml_button">
<a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="reset_button" role="button" aria-disabled="false">
<span class="ui-button-text">Send reset link</span>
</a>
</div>
</div>
</div>
<script type="text/javascript">
/* Events binding */
$( '#email' ).on( 'keyup', function( event )
{
if( event.keyCode == 13 )
{
event.preventDefault();
reset_password();
}
} );
$( '#reset_button' ).on( 'click', reset_password );
$( '#email' ).focus();
</script>
</body>
</html>