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

106 lines
4.2 KiB
PHTML
Executable File
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="tabs">
<ul class="idTabs">
<li><a href="#general">个人信息</a></li>
<li><a href="#email">Email</a></li>
<li><a href="#password">密码修改</a></li>
</ul>
<div id="general">
<form id="opt_general">
<p>
<label class="required">姓名:</label><br />
<input type="text" name="name" value="<?php if($this->user['realname']) echo $this->user['realname'];?>" />
</p>
<p>
<label>联系电话:</label><br />
<input type="text" name="phone" value="<?php if($this->user['phone']) echo $this->user['phone'];?>" />
</p>
<p>
<label>单位:</label><br />
<input type="text" name="employer" value="<?php if($this->user['unit']) echo $this->user['unit'];?>" />
</p>
<p>
<label>地址:</label><br />
<input type="text" name="address" value="<?php if($this->user['address']) echo $this->user['address'];?>" />
</p>
<p>
<label>邮政编码:</label><br />
<input type="text" name="postcode" value="<?php if($this->user['postcode']) echo $this->user['postcode'];?>" />
</p>
<p>
<label>所属项目:</label><br />
<textarea name="project" cols="80" rows="4"><?php if($this->user['project']) echo $this->user['project'];?></textarea>
</p>
<p>
<label> </label>
<button type="button" class="btn btn-green" id="save_opt_general">保存</button> <button type="reset" id="reset" class="btn">取消</button><span id="save_opt_general_returninfo"></span>
</p>
</form>
</div>
<div id="email">
<form id="opt_email">
<p>
<label class="required">Email:</label><br />
<input type="text" value="<?php if($this->user['email']) echo $this->user['email'];?>" name="email" />
</p>
<p>
<label class="required">请输入密码:</label><br />
<input type="password" name="password" />
</p>
<p>
<label> </label>
<button type="button" class="btn btn-green" id="save_opt_email">保存</button> <button type="reset" id="reset" class="btn">取消</button><span id="save_opt_email_returninfo"></span>
</p>
</form>
</div>
<div id="password">
<form id="opt_password">
<p>
<label class="required">输入当前密码:</label><br />
<input type="password" name="password" value="" />
</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>
<p>
<label> </label>
<button type="button" class="btn btn-green" id="save_opt_password">保存</button> <button type="reset" id="reset" class="btn">取消</button><span id="save_opt_password_returninfo"></span>
</p>
</form>
</div>
</div>
</div>
<script>
$('#opt_general').ajaxform({
'submitBtn':'#save_opt_general',
'returnInfoBox':'#save_opt_general_returninfo',
'url':'/account/saveopt/opt/general'
});
$('#opt_email').ajaxform({
'submitBtn':'#save_opt_email',
'returnInfoBox':'#save_opt_email_returninfo',
'url':'/account/saveopt/opt/email'
});
$('#opt_password').ajaxform({
'submitBtn':'#save_opt_password',
'returnInfoBox':'#save_opt_password_returninfo',
'url':'/account/saveopt/opt/password'
});
</script>