Anand Doshi | 330dae9 | 2013-09-10 13:46:15 +0530 | [diff] [blame] | 1 | {% 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> |
| 9 | <li><a href="account">My Account</a></li> |
| 10 | <li class="active"><i class="icon-user icon-fixed-width"></i> My Profile</li> |
| 11 | </ul> |
Anand Doshi | b0d996f | 2013-09-10 18:29:39 +0530 | [diff] [blame^] | 12 | <div class="alert alert-warning" id="message" style="display: none;"></div> |
Anand Doshi | 330dae9 | 2013-09-10 13:46:15 +0530 | [diff] [blame] | 13 | <form> |
| 14 | <fieldset> |
| 15 | <label>Full Name</label> |
| 16 | <input class="form-control" type="text" id="fullname" placeholder="Your Name"> |
| 17 | </fieldset> |
| 18 | <fieldset> |
| 19 | <label>Password</label> |
| 20 | <input class="form-control" type="password" id="password" placeholder="Password"> |
| 21 | </fieldset> |
| 22 | <fieldset> |
| 23 | <label>Company Name</label> |
| 24 | <input class="form-control" type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}"> |
| 25 | </fieldset> |
| 26 | <fieldset> |
| 27 | <label>Mobile No</label> |
| 28 | <input class="form-control" type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}"> |
| 29 | </fieldset> |
| 30 | <fieldset> |
| 31 | <label>Phone</label> |
| 32 | <input class="form-control" type="text" id="phone" placeholder="Phone" value="{{ phone }}"> |
| 33 | </fieldset> |
| 34 | <button id="update_profile" type="submit" class="btn btn-default">Update</button> |
| 35 | </form> |
| 36 | </div> |
| 37 | <script> |
| 38 | $(document).ready(function() { |
| 39 | $("#fullname").val(getCookie("full_name") || ""); |
| 40 | $("#update_profile").click(function() { |
| 41 | wn.call({ |
Anand Doshi | b0d996f | 2013-09-10 18:29:39 +0530 | [diff] [blame^] | 42 | method: "portal.templates.pages.profile.update_profile", |
Anand Doshi | 330dae9 | 2013-09-10 13:46:15 +0530 | [diff] [blame] | 43 | type: "POST", |
| 44 | args: { |
| 45 | fullname: $("#fullname").val(), |
| 46 | password: $("#password").val(), |
| 47 | company_name: $("#company_name").val(), |
| 48 | mobile_no: $("#mobile_no").val(), |
| 49 | phone: $("#phone").val() |
| 50 | }, |
| 51 | btn: this, |
| 52 | msg: $("#message"), |
| 53 | callback: function(r) { |
| 54 | if(!r.exc) $("#user-full-name").html($("#fullname").val()); |
| 55 | } |
| 56 | }); |
| 57 | return false; |
| 58 | }) |
| 59 | }) |
| 60 | </script> |
| 61 | {% endblock %} |