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