@@ -202,7 +202,7 @@ frappe.ui.form.save = function(frm, action, callback, btn) { | |||||
frappe.ui.form.update_calling_link = function(name) { | frappe.ui.form.update_calling_link = function(name) { | ||||
if(frappe._from_link) { | if(frappe._from_link) { | ||||
// set value | // set value | ||||
if (frappe._from_link.doc.parentfield){ | |||||
if (frappe._from_link.doc && frappe._from_link.doc.parentfield){ | |||||
//update values for child table | //update values for child table | ||||
$.each(frappe._from_link.frm.fields_dict[frappe._from_link.doc.parentfield].grid.grid_rows, function(index, field) { | $.each(frappe._from_link.frm.fields_dict[frappe._from_link.doc.parentfield].grid.grid_rows, function(index, field) { | ||||
if(field.doc && field.doc.name===frappe._from_link.docname){ | if(field.doc && field.doc.name===frappe._from_link.docname){ | ||||
@@ -28,9 +28,11 @@ | |||||
</a> | </a> | ||||
</li> | </li> | ||||
{%- endfor %} | {%- endfor %} | ||||
{% if frappe.user != 'Guest' %} | |||||
<li class="sidebar-item"> | <li class="sidebar-item"> | ||||
<a href="/me">My Account</a> | <a href="/me">My Account</a> | ||||
</li> | </li> | ||||
{% endif %} | |||||
</ul> | </ul> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -95,10 +95,8 @@ def build_context(context): | |||||
add_metatags(context) | add_metatags(context) | ||||
if frappe.session.user == 'Guest': | |||||
context.show_sidebar = 0 | |||||
if context.show_sidebar: | if context.show_sidebar: | ||||
context.no_cache = 1 | |||||
add_sidebar_data(context) | add_sidebar_data(context) | ||||
# determine templates to be used | # determine templates to be used | ||||
@@ -223,7 +223,7 @@ | |||||
"bold": 0, | "bold": 0, | ||||
"collapsible": 0, | "collapsible": 0, | ||||
"columns": 0, | "columns": 0, | ||||
"description": "Page content", | |||||
"description": "", | |||||
"fieldname": "sb1", | "fieldname": "sb1", | ||||
"fieldtype": "Section Break", | "fieldtype": "Section Break", | ||||
"hidden": 0, | "hidden": 0, | ||||
@@ -669,7 +669,7 @@ | |||||
"issingle": 0, | "issingle": 0, | ||||
"istable": 0, | "istable": 0, | ||||
"max_attachments": 20, | "max_attachments": 20, | ||||
"modified": "2016-09-26 07:09:08.700666", | |||||
"modified": "2016-10-03 07:50:38.069990", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"module": "Website", | "module": "Website", | ||||
"name": "Web Page", | "name": "Web Page", | ||||
@@ -685,6 +685,7 @@ | |||||
"export": 0, | "export": 0, | ||||
"if_owner": 0, | "if_owner": 0, | ||||
"import": 0, | "import": 0, | ||||
"is_custom": 0, | |||||
"permlevel": 0, | "permlevel": 0, | ||||
"print": 0, | "print": 0, | ||||
"read": 1, | "read": 1, | ||||
@@ -11,4 +11,7 @@ no_cache = 1 | |||||
no_sitemap = 1 | no_sitemap = 1 | ||||
def get_context(context): | def get_context(context): | ||||
if frappe.session.user=='Guest': | |||||
frappe.throw(_("You need to be logged in to access this page"), frappe.PermissionError) | |||||
context.show_sidebar=True | context.show_sidebar=True |