1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <extend name="Public:base" />
- <block name="head_script">
- <link href="__CSS__/member.css" rel="stylesheet" type="text/css">
- <link href="__PUBLIC__/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
- </block>
- <block name="content">
- <div>
- <div class="container">
- <div class="row">
-
- <div id="content" class="col-sm-9">
- <div class="page-title">
- <h1>忘记密码?</h1>
- </div>
- <p>输入您账户的邮箱,系统将把重置的密码发到您的邮箱上。</p>
- <div class="alert alert-success hidden" role="alert">
- <button type="button" class="close"><span aria-hidden="true">×</span></button>
- <div id="success">密码重置成功,已发送到您的邮箱</div>
- </div>
-
- <fieldset>
- <div class="form-group required clearfix">
- <label class="col-sm-2 control-label" for="input-password">电子邮箱</label>
- <div class="col-sm-10">
- <input id="email" class="form-control" type="text" name="email" />
- </div>
- </div>
-
- </fieldset>
- <div class="buttons clearfix">
- <div class="left" style="margin-left:15px;">
- <button class="button continue " id="submit" type="submit">提交</button>
- </div>
- </div>
-
- </div>
- <include file="User/side" />
- </div>
- </div>
- </div>
- </block>
- <block name="foot_script">
- <script type="text/javascript">
- $('.button').click(function(){
- $.ajax({
- url: '{$action}',
- type: 'post',
- data: $('input[type=\'text\']'),
- dataType: 'json',
- beforeSend: function() {
- $('#submit').attr('disabled', true);
- $('#submit').after('<span class="wait"> <img src="__IMG__/loading.gif" alt="" /></span>');
- },
- complete: function() {
- $('#submit').attr('disabled', false);
- $('.wait').remove();
- },
- success: function(json) {
- $('.warning, .error').remove();
-
- if (json['redirect']) {
- $('.alert-success').removeClass('hidden');
- setTimeout(function(){
- location = json['redirect']
- },5000);
- } else if (json['error']) {
-
- if (json['error']['email']) {
- $("input[name='email']").after('<span class="error">' + json['error']['email'] + '</span>');
- }
-
- }
- },
- error: function(xhr, ajaxOptions, thrownError) {
- alert('修改失败');
- }
- });
- });
- $('.close').click(function(){
- $(this).parent().addClass('hidden');
- });
- </script>
- </block>
|