Commit bfca0888 authored by Dries's avatar Dries
Browse files

- Patch #7504 by bylund: multiple form_radio-function calls is used instead
  of a single form_radios-call. This could cause problems when trying to
  style individual form elements.
parent 0f1f45c7
...@@ -1632,9 +1632,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) { ...@@ -1632,9 +1632,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
case "form admin": case "form admin":
if (user_access("administer comments")) { if (user_access("administer comments")) {
$selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", 2); $selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", 2);
$output = form_radio(t("Disabled"), "comment", 0, ($selected == 0)); $output = form_radios("", "comment", $selected, array(t("Disabled"), t("Read only"), t("Read/write")));
$output .= form_radio(t("Read only"), "comment", 1, ($selected == 1));
$output .= form_radio(t("Read/write"), "comment", 2, ($selected == 2));
return form_group(t("User comments"), $output); return form_group(t("User comments"), $output);
} }
break; break;
......
...@@ -1632,9 +1632,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) { ...@@ -1632,9 +1632,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
case "form admin": case "form admin":
if (user_access("administer comments")) { if (user_access("administer comments")) {
$selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", 2); $selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", 2);
$output = form_radio(t("Disabled"), "comment", 0, ($selected == 0)); $output = form_radios("", "comment", $selected, array(t("Disabled"), t("Read only"), t("Read/write")));
$output .= form_radio(t("Read only"), "comment", 1, ($selected == 1));
$output .= form_radio(t("Read/write"), "comment", 2, ($selected == 2));
return form_group(t("User comments"), $output); return form_group(t("User comments"), $output);
} }
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment