brotherton-erpnext/portal/templates/profile.html
2013-09-09 12:32:35 +05:30

61 lines
1.8 KiB
HTML

{% extends "app/website/templates/html/page.html" %}
{% set title="My Profile" %}
{% block content %}
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="index">Home</a></li>
<li><a href="account">My Account</a></li>
<li class="active"><i class="icon-user icon-fixed-width"></i> My Profile</li>
</ul>
<div class="alert" id="message" style="display: none;"></div>
<form>
<fieldset>
<label>Full Name</label>
<input class="form-control" type="text" id="fullname" placeholder="Your Name">
</fieldset>
<fieldset>
<label>Password</label>
<input class="form-control" type="password" id="password" placeholder="Password">
</fieldset>
<fieldset>
<label>Company Name</label>
<input class="form-control" type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}">
</fieldset>
<fieldset>
<label>Mobile No</label>
<input class="form-control" type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}">
</fieldset>
<fieldset>
<label>Phone</label>
<input class="form-control" type="text" id="phone" placeholder="Phone" value="{{ phone }}">
</fieldset>
<button id="update_profile" type="submit" class="btn btn-default">Update</button>
</form>
</div>
<script>
$(document).ready(function() {
$("#fullname").val(getCookie("full_name") || "");
$("#update_profile").click(function() {
wn.call({
method: "startup.webutils.update_profile",
type: "POST",
args: {
fullname: $("#fullname").val(),
password: $("#password").val(),
company_name: $("#company_name").val(),
mobile_no: $("#mobile_no").val(),
phone: $("#phone").val()
},
btn: this,
msg: $("#message"),
callback: function(r) {
if(!r.exc) $("#user-full-name").html($("#fullname").val());
}
});
return false;
})
})
</script>
{% endblock %}