[fix] [minor] [website]
diff --git a/portal/templates/pages/profile.html b/portal/templates/pages/profile.html
index 6971909..fe9ded5 100644
--- a/portal/templates/pages/profile.html
+++ b/portal/templates/pages/profile.html
@@ -15,10 +15,6 @@
<input class="form-control" type="text" id="fullname" placeholder="Your Name">
</fieldset>
<fieldset>
- <label>Password</label>
- <input class="form-control" type="password" id="password" placeholder="Password">
- </fieldset>
- <fieldset>
<label>Company Name</label>
<input class="form-control" type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}">
</fieldset>
@@ -42,7 +38,6 @@
type: "POST",
args: {
fullname: $("#fullname").val(),
- password: $("#password").val(),
company_name: $("#company_name").val(),
mobile_no: $("#mobile_no").val(),
phone: $("#phone").val()
diff --git a/portal/templates/pages/profile.py b/portal/templates/pages/profile.py
index b7be74c..8edd830 100644
--- a/portal/templates/pages/profile.py
+++ b/portal/templates/pages/profile.py
@@ -3,6 +3,7 @@
from __future__ import unicode_literals
import webnotes
+from webnotes import _
from webnotes.utils import cstr
no_cache = True
@@ -28,5 +29,11 @@
from selling.utils.cart import update_party
update_party(fullname, company_name, mobile_no, phone)
- from core.doctype.profile import profile
- return profile.update_profile(fullname, password)
\ No newline at end of file
+ if not fullname:
+ return _("Name is required")
+
+ webnotes.conn.set_value("Profile", webnotes.session.user, "first_name", fullname)
+ webnotes.add_cookies["full_name"] = fullname
+
+ return _("Updated")
+
\ No newline at end of file
diff --git a/portal/templates/sales_transactions.html b/portal/templates/sales_transactions.html
index 5f33797..f4fd5d1 100644
--- a/portal/templates/sales_transactions.html
+++ b/portal/templates/sales_transactions.html
@@ -2,9 +2,11 @@
{% block javascript -%}
<script>
+$(document).ready(function() {
global_number_format = "{{ global_number_format }}";
currency = "{{ currency }}";
wn.currency_symbols = {{ currency_symbols }};
+});
</script>
{{ super() }}
diff --git a/public/js/website_utils.js b/public/js/website_utils.js
index fceb8f6..06bbe59 100644
--- a/public/js/website_utils.js
+++ b/public/js/website_utils.js
@@ -24,8 +24,12 @@
// update login
erpnext.cart.set_cart_count();
- $("#user-tools a").tooltip({"placement":"bottom"});
- $("#user-tools-post-login a").tooltip({"placement":"bottom"});
+ // update profile
+ if(full_name) {
+ $('.navbar li[data-label="Profile"] a')
+ .html('<i class="icon-fixed-width icon-user"></i> ' + full_name);
+ }
+
});
// shopping cart
diff --git a/support/doctype/support_ticket/templates/pages/ticket.html b/support/doctype/support_ticket/templates/pages/ticket.html
index 3584d7b..4b41dc2 100644
--- a/support/doctype/support_ticket/templates/pages/ticket.html
+++ b/support/doctype/support_ticket/templates/pages/ticket.html
@@ -12,7 +12,6 @@
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="index">Home</a></li>
- <li><a href="account">My Account</a></li>
<li><a href="tickets">My Tickets</a></li>
<li class="active"><i class="icon-ticket icon-fixed-width"></i> {{ doc.name }}</li>
</ul>
@@ -34,8 +33,8 @@
<div class="col-md-8">
<div class="row col-md-12">{{ doc.subject }}</div>
</div>
- <div class="col-md-2 pull-right">
- <span class="text-muted">{{ utils.formatdate(doc.creation) }}</span>
+ <div class="col-md-2">
+ <span class="text-muted pull-right">{{ utils.formatdate(doc.creation) }}</span>
</div>
</div>
<div class="row">