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 | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 6 | <div class="col-md-12"> |
Rushabh Mehta | bed19ac | 2013-03-21 17:12:25 +0530 | [diff] [blame] | 7 | <ul class="breadcrumb"> |
Anand Doshi | f7e5648 | 2013-08-29 17:46:40 +0530 | [diff] [blame] | 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> |
Rushabh Mehta | bed19ac | 2013-03-21 17:12:25 +0530 | [diff] [blame] | 11 | </ul> |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 12 | <div class="alert" id="message" style="display: none;"></div> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 13 | <form> |
| 14 | <fieldset> |
| 15 | <label>Full Name</label> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 16 | <input class="form-control" type="text" id="fullname" placeholder="Your Name"> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 17 | </fieldset> |
| 18 | <fieldset> |
| 19 | <label>Password</label> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 20 | <input class="form-control" type="password" id="password" placeholder="Password"> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 21 | </fieldset> |
| 22 | <fieldset> |
| 23 | <label>Company Name</label> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 24 | <input class="form-control" type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}"> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 25 | </fieldset> |
| 26 | <fieldset> |
| 27 | <label>Mobile No</label> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 28 | <input class="form-control" type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}"> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 29 | </fieldset> |
| 30 | <fieldset> |
| 31 | <label>Phone</label> |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 32 | <input class="form-control" type="text" id="phone" placeholder="Phone" value="{{ phone }}"> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 33 | </fieldset> |
| 34 | <button id="update_profile" type="submit" class="btn btn-default">Update</button> |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 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 | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 42 | method: "startup.webutils.update_profile", |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 43 | type: "POST", |
| 44 | args: { |
| 45 | fullname: $("#fullname").val(), |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 46 | password: $("#password").val(), |
| 47 | company_name: $("#company_name").val(), |
| 48 | mobile_no: $("#mobile_no").val(), |
| 49 | phone: $("#phone").val() |
Rushabh Mehta | a75efa7 | 2013-03-19 17:59:49 +0530 | [diff] [blame] | 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> |
Anand Doshi | 2ac0a83 | 2013-07-10 20:49:44 +0530 | [diff] [blame] | 61 | {% endblock %} |