diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-06-03 20:33:56 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-06-03 20:33:56 +0000 |
commit | 3151a1cb71b972bc70aa083b2fd6a90ab36b7921 (patch) | |
tree | 99f3391490a05a6c9e64ccae446b61fb1bf02cab /modules/comment.module | |
parent | ed528531c75929aa77c68e302d7f051d542974ed (diff) | |
download | brdo-3151a1cb71b972bc70aa083b2fd6a90ab36b7921.tar.gz brdo-3151a1cb71b972bc70aa083b2fd6a90ab36b7921.tar.bz2 |
- 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.
Diffstat (limited to 'modules/comment.module')
-rw-r--r-- | modules/comment.module | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/comment.module b/modules/comment.module index e61cda4ef..e0780b416 100644 --- a/modules/comment.module +++ b/modules/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": |