Rushabh Mehta | 3023a8f | 2013-04-03 16:34:23 +0530 | [diff] [blame] | 1 | {% extends "app/website/templates/html/page.html" %} |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 2 | |
| 3 | {% set title="My Profile" %} |
| 4 | |
| 5 | {% block content %} |
Rushabh Mehta | 4a2f0f8 | 2013-05-22 11:57:05 +0530 | [diff] [blame] | 6 | <div class="col col-lg-12"> |
Rushabh Mehta | bed19ac | 2013-03-21 17:12:25 +0530 | [diff] [blame] | 7 | <ul class="breadcrumb"> |
| 8 | <li><a href="index">Home</a> <span class="divider">/</span></li> |
| 9 | <li><a href="account">My Account</a> <span class="divider">/</span></li> |
| 10 | <li class="active">My Profile</li> |
| 11 | </ul> |
| 12 | <h2><i class="icon-user"></i> My Profile</h2> |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 13 | <hr> |
| 14 | <div class="alert" id="message" style="display: none;"></div> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 15 | <form> |
| 16 | <fieldset> |
| 17 | <label>Full Name</label> |
| 18 | <input type="text" id="fullname" placeholder="Your Name"> |
| 19 | </fieldset> |
| 20 | <fieldset> |
| 21 | <label>Password</label> |
| 22 | <input type="password" id="password" placeholder="Password"> |
| 23 | </fieldset> |
| 24 | <fieldset> |
| 25 | <label>Company Name</label> |
| 26 | <input type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}"> |
| 27 | </fieldset> |
| 28 | <fieldset> |
| 29 | <label>Mobile No</label> |
| 30 | <input type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}"> |
| 31 | </fieldset> |
| 32 | <fieldset> |
| 33 | <label>Phone</label> |
| 34 | <input type="text" id="phone" placeholder="Phone" value="{{ phone }}"> |
| 35 | </fieldset> |
| 36 | <button id="update_profile" type="submit" class="btn btn-default">Update</button> |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 37 | </form> |
| 38 | </div> |
| 39 | <script> |
| 40 | $(document).ready(function() { |
| 41 | $("#fullname").val(getCookie("full_name") || ""); |
| 42 | $("#update_profile").click(function() { |
| 43 | wn.call({ |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 44 | method: "startup.webutils.update_profile", |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 45 | type: "POST", |
| 46 | args: { |
| 47 | fullname: $("#fullname").val(), |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 48 | password: $("#password").val(), |
| 49 | company_name: $("#company_name").val(), |
| 50 | mobile_no: $("#mobile_no").val(), |
| 51 | phone: $("#phone").val() |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 52 | }, |
| 53 | btn: this, |
| 54 | msg: $("#message"), |
| 55 | callback: function(r) { |
| 56 | if(!r.exc) $("#user-full-name").html($("#fullname").val()); |
| 57 | } |
| 58 | }); |
| 59 | return false; |
| 60 | }) |
| 61 | }) |
| 62 | </script> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 63 | {% endblock %} |