2014-10-21 10:46:30 +00:00
|
|
|
{% block title %} {{ "My Profile" }} {% endblock %}
|
|
|
|
|
|
|
|
{% block header %}<h2>My Profile</h2>{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="user-content" style="max-width: 500px;">
|
|
|
|
<div class="alert alert-warning" 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>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_user" type="submit" class="btn btn-default">Update</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("#fullname").val(getCookie("full_name") || "");
|
|
|
|
$("#update_user").click(function() {
|
|
|
|
frappe.call({
|
2015-11-05 11:25:10 +00:00
|
|
|
method: "erpnext.templates.pages.edit_profile.update_user",
|
2014-10-21 10:46:30 +00:00
|
|
|
type: "POST",
|
|
|
|
args: {
|
|
|
|
fullname: $("#fullname").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>
|
|
|
|
<!-- no-sidebar -->
|
|
|
|
{% endblock %}
|
|
|
|
|