westdc-zf1/application/default/views/scripts/account/getpasswd.phtml

62 lines
2.2 KiB
PHTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('修改用户信息');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/static/css/default.css');
$this->headScript()->appendFile('/static/js/ajaxform.js');
$this->headScript()->appendFile('/static/js/jquery.idTabs.min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/account/edit">帐号设置</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="info">
<div id="password">
<form id="opt_password" action="/account/getpasswd/ac/set" method="post">
<p>
请设置您的新密码:
</p>
<p>
<label class="required">新密码:</label><br />
<input type="password" name="password_new" id="password_new" value="" />
</p>
<p>
<label class="required">确认新密码:</label><br />
<input type="password" name="password_confirm" id="password_confirm" value="" />
</p>
<input type="hidden" name="a" value="<?php if (!empty($this->resetid)) echo $this->resetid;?>" />
<input type="hidden" name="u" value="<?php if (!empty($this->uid)) echo $this->uid;?>" />
<p>
<label> </label>
<button type="button" class="btn btn-green" id="save_password" onclick="getpasswd();">提交</button>
<span id="save_password_returninfo"></span>
</p>
</form>
</div>
</div>
<script>
function getpasswd(){
var btn = $('#save_password').html();
$.ajax({
'type':"POST",
'url':"/account/getpasswd/ac/set",
'data':$('#opt_password').serialize(),
'success':function(html){
$('#save_password').html(btn);
$('#save_password_returninfo').html(html);
setTimeout("$('#save_password').removeAttr('disabled');",3000);
},
'beforeSend':function(){
$('#save_password').attr('disabled','disabled');
$('#save_password').html('<img src="/images/11887177066.gif" />正在发送...');
}
});
}
$('#opt_password').bind('submit',function(){
getpasswd();
return false;
});
</script>