westdc-zf1/module/Application/view/application/account/forgotpassword.phtml

76 lines
2.6 KiB
PHTML

<style>
.form-login {
overflow:hidden;
max-width: 500px;
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
</style>
<div class="container">
<div class="form-login">
<h2 class="form-signin-heading">找回密码</h2>
<?php if(empty($this->error) && empty($this->msg)) { ?>
<div class="alert alert-info alert-login">
请输入注册时的邮箱
</div>
<?php }else{ ?>
<div class="alert alert-error alert-login">
<?= $this->error ?>
</div>
<?php } ?>
<?= !empty($this->msg) ? '<div class="alert alert-success alert-login">'.$this->msg.'</div>':"" ?>
<?php if(empty($this->msg)) { ?>
<form action="/account/forgotpassword" method="post" id="login_form" class="form-horizontal">
<div class="control-group">
<label for="inputEmail1" class="col-lg-3 control-label">注册邮箱</label>
<div class="controls">
<input type="text" class="form-control" id="inputEmail1" name="email" placeholder="Email">
</div>
</div>
<div class="control-group">
<label for="captcha" class="col-lg-3 control-label">验 证 码</label>
<div class="controls">
<input type="text" class="form-control" id="captcha" name="captcha" placeholder="captcha">
</div>
<div class="controls">
<img id="captcha_img" src="<?php echo $this->captcha ?>" style="cursor:pointer" />
<a href="javascript:void(0);" onclick="changecaptcha()">看不清?</a>
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="hidden" name="submit" value="1" />
<?php if(!empty($this->href)){?>
<input type="hidden" name="href" value="<?= $this->href ?>" />
<?php }?>
<button class="btn btn-large btn-primary text-center" type="submit">提交</button>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
<script>
$('#captcha_img').click(function(e) {
changecaptcha();
});
function changecaptcha(){
$.ajax({
url:"/account/captcha",
data:"<?= time() ?>",
success: function(src){
document.getElementById('captcha_img').src = src;
}
});
}
</script>