blob: 697190953be9f440094f97be718cb3a8b23d42dc [file] [log] [blame]
Anand Doshi330dae92013-09-10 13:46:15 +05301{% extends base_template %}
2
3{% set title="My Profile" %}
4
5{% block content %}
6<div class="col-md-12">
7 <ul class="breadcrumb">
8 <li><a href="index">Home</a></li>
Anand Doshi330dae92013-09-10 13:46:15 +05309 <li class="active"><i class="icon-user icon-fixed-width"></i> My Profile</li>
10 </ul>
Anand Doshib0d996f2013-09-10 18:29:39 +053011 <div class="alert alert-warning" id="message" style="display: none;"></div>
Anand Doshi330dae92013-09-10 13:46:15 +053012 <form>
13 <fieldset>
14 <label>Full Name</label>
15 <input class="form-control" type="text" id="fullname" placeholder="Your Name">
16 </fieldset>
17 <fieldset>
18 <label>Password</label>
19 <input class="form-control" type="password" id="password" placeholder="Password">
20 </fieldset>
21 <fieldset>
22 <label>Company Name</label>
23 <input class="form-control" type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}">
24 </fieldset>
25 <fieldset>
26 <label>Mobile No</label>
27 <input class="form-control" type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}">
28 </fieldset>
29 <fieldset>
30 <label>Phone</label>
31 <input class="form-control" type="text" id="phone" placeholder="Phone" value="{{ phone }}">
32 </fieldset>
33 <button id="update_profile" type="submit" class="btn btn-default">Update</button>
34 </form>
35</div>
36<script>
37$(document).ready(function() {
38 $("#fullname").val(getCookie("full_name") || "");
39 $("#update_profile").click(function() {
40 wn.call({
Anand Doshib0d996f2013-09-10 18:29:39 +053041 method: "portal.templates.pages.profile.update_profile",
Anand Doshi330dae92013-09-10 13:46:15 +053042 type: "POST",
43 args: {
44 fullname: $("#fullname").val(),
45 password: $("#password").val(),
46 company_name: $("#company_name").val(),
47 mobile_no: $("#mobile_no").val(),
48 phone: $("#phone").val()
49 },
50 btn: this,
51 msg: $("#message"),
52 callback: function(r) {
53 if(!r.exc) $("#user-full-name").html($("#fullname").val());
54 }
55 });
56 return false;
57 })
58})
59</script>
60{% endblock %}