修改了用户编辑个人信息的页面
This commit is contained in:
parent
aaef80892c
commit
6d3c8952b0
|
@ -1,13 +1,109 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('修改用户信息');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/register.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/account/edit">修改用户信息</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="info">
|
||||
|
||||
|
||||
<?php echo $this->form;?></div>
|
||||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('修改用户信息');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/default.css');
|
||||
$this->headLink()->appendStylesheet('/css/register.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.idTabs.min.js');
|
||||
$this->breadcrumb('<a href="/">home</a>');
|
||||
$this->breadcrumb('<a href="/account/edit">options</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="info">
|
||||
<div id="tabs">
|
||||
<ul class="idTabs">
|
||||
<li><a href="#general">General</a></li>
|
||||
<li><a href="#email">Email</a></li>
|
||||
<li><a href="#password">Password</a></li>
|
||||
</ul>
|
||||
<div id="general">
|
||||
<form id="opt_general">
|
||||
<p>
|
||||
<label class="required">Name:</label><br />
|
||||
<input type="text" name="name" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Phone number:</label><br />
|
||||
<input type="text" name="phone" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Employer:</label><br />
|
||||
<input type="text" name="employer" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Address:</label><br />
|
||||
<input type="text" name="address" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Project:</label><br />
|
||||
<textarea name="project" cols="80" rows="4"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label> </label>
|
||||
<button type="button" class="btn btn-green" id="save_opt_general">Save Changes</button> <button type="reset" id="reset" class="btn">Cancel</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="" name="email" />
|
||||
</p>
|
||||
<p>
|
||||
<label class="required">Password:</label><br />
|
||||
<input type="password" name="password" />
|
||||
</p>
|
||||
<p>
|
||||
<label> </label>
|
||||
<button type="button" class="btn btn-green" id="save_opt_email">Save Changes</button> <button type="reset" id="reset" class="btn">Cancel</button><span id="save_opt_email_returninfo"></span>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div id="password">
|
||||
<form id="opt_password">
|
||||
<p>
|
||||
<label class="required">Current Password:</label><br />
|
||||
<input type="password" name="password" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label class="required">New Password:</label><br />
|
||||
<input type="password" name="password_new" id="password_new" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label class="required">Re-type new password:</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">Save Changes</button> <button type="reset" id="reset" class="btn">Cancel</button><span id="save_opt_password_returninfo"></span>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function postform(id,url){
|
||||
var savebtn = "#save_"+id;
|
||||
var reinfo = savebtn+"_returninfo";
|
||||
var btn = $(savebtn).html();
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':url,
|
||||
'data':$('#'+id).serialize(),
|
||||
'success':function(html){
|
||||
$(savebtn).html(btn);
|
||||
$(reinfo).html(html);
|
||||
setTimeout("$('"+savebtn+"').removeAttr('disabled');$('"+reinfo+"').html('')",3000);
|
||||
},
|
||||
'beforeSend':function(){
|
||||
$(savebtn).attr('disabled','disabled');
|
||||
$(savebtn).html('<img src="/images/ajax-loading-small.gif" />Submit...');
|
||||
}
|
||||
});
|
||||
}
|
||||
$('#save_opt_general').click(function(){postform('opt_general','/account/saveopt/opt/general');});
|
||||
$('#save_opt_email').click(function(){postform('opt_email','/account/saveopt/opt/email');});
|
||||
$('#save_opt_password').click(function(){postform('opt_password','/account/saveopt/opt/password');});
|
||||
</script>
|
Loading…
Reference in New Issue