From c2becc8fe3241d3872fdcd323638cc1eb76fd818 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 3 Sep 2015 12:49:22 +0530 Subject: [PATCH] [minor] fix comment names --- frappe/templates/includes/comments/comments.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frappe/templates/includes/comments/comments.html b/frappe/templates/includes/comments/comments.html index 1e3a3734a0..de94c4a867 100644 --- a/frappe/templates/includes/comments/comments.html +++ b/frappe/templates/includes/comments/comments.html @@ -65,8 +65,13 @@ $(this).toggle(false); $("#comment-form").toggle(); - $("[name='comment_by']").val(getCookie("user_id") || ""); - $("[name='comment_by_fullname']").val(getCookie("full_name") || ""); + var full_name = "", user_id = ""; + if(frappe.is_user_logged_in()) { + full_name = getCookie("full_name"); + user_id = getCookie("user_id"); + } + $("[name='comment_by']").val(user_id); + $("[name='comment_by_fullname']").val(full_name); $("#comment-form textarea").val(""); }) $("#submit-comment").click(function() {