From 3ee4fb3f951a91b78279183f0196b81650631e60 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 22 Nov 2011 15:25:09 +0800 Subject: [PATCH] MDL-30375 Blocks: Comments block will show blank textbox rather then hiding and 'add a comment' will be visible if it's empty --- blocks/comments/block_comments.php | 2 +- comment/comment.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/blocks/comments/block_comments.php b/blocks/comments/block_comments.php index 60bca8d8dbe..a00cd09edfc 100644 --- a/blocks/comments/block_comments.php +++ b/blocks/comments/block_comments.php @@ -74,7 +74,7 @@ class block_comments extends block_base { $args->linktext = get_string('showcomments'); $args->notoggle = true; $args->autostart = true; - $args->displaycancel = true; + $args->displaycancel = false; $comment = new comment($args); $comment->set_view_permission(true); diff --git a/comment/comment.js b/comment/comment.js index 87f0e9e7ce9..dcf669e293e 100644 --- a/comment/comment.js +++ b/comment/comment.js @@ -58,6 +58,7 @@ M.core_comment = { return false; }, this); } + scope.toggle_textarea(false); CommentHelper.confirmoverlay = new Y.Overlay({ bodyContent: '
'+M.str.moodle.yes+' '+M.str.moodle.no+'
', visible: false @@ -79,6 +80,7 @@ bodyContent: '