From 3151a1cb71b972bc70aa083b2fd6a90ab36b7921 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 3 Jun 2003 20:33:56 +0000 Subject: - Usability improvements to the node form. Patch by Al. Will incorporate some of Moshe's node form work later on. TODO: - I just spotted a problem with the promote field; it does not seem to be "sticky" when you click the preview button. I checked and this was also the case prior to applying this patch. --- modules/comment/comment.module | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e61cda4ef..e0780b416 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1485,7 +1485,11 @@ function comment_nodeapi(&$node, $op, $arg = 0) { return array("comment"); case "form admin": if (user_access("administer comments")) { - return form_select(t("Allow user comments"), "comment", isset($node->comment) ? $node->comment : variable_get("comment_$node->type", 2), array(t("Disabled"), t("Read only"), t("Read-write"))); + $selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", 2); + $output = form_radio(t("Disabled"), "comment", 0, ($selected == 0)); + $output .= form_radio(t("Read only"), "comment", 1, ($selected == 1)); + $output .= form_radio(t("Read/write"), "comment", 2, ($selected == 2)); + return form_item(t("Allow user comments"), $output); } break; case "validate": -- cgit v1.2.3