diff --git a/modules/comment.module b/modules/comment.module index e61cda4eff6..e0780b4165d 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": diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e61cda4eff6..e0780b4165d 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": diff --git a/modules/node.module b/modules/node.module index 5d916d04e7c..09db9f19e63 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1102,12 +1102,12 @@ function node_form($edit, $error = NULL) { $output .= form_textfield(t("Authored by"), "name", $edit->name, 20, 60, $error["name"]); $output .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]); $output .= "
"; - $output .= form_select(t("Set public/published"), "status", isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1), array(t("Disabled"), t("Enabled"))); - $output .= form_select(t("Promote to front page"), "promote", isset($edit->promote) ? $edit->promote : variable_get("node_promote_$edit->type", 1), array(t("Disabled"), t("Enabled"))); - $output .= form_select(t("Moderation status"), "moderate", isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0), array(t("Approved"), t("Awaiting approval"))); - $output .= form_select(t("Static on front page"), "static", isset($edit->static) ? $edit->static : variable_get("node_static_$edit->type", 0), array(t("Disabled"), t("Enabled"))); + $output .= form_checkbox(t("Published"), "status", 1, isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1)); + $output .= form_checkbox(t("Approved"), "moderate", 1, isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0)); + $output .= form_checkbox(t("Promoted to front page"), "promote", 1, isset($edit->promote) ? $edit->promote : variable_get("node_promote_$edit->type", 1)); + $output .= form_checkbox(t("Static on front page"), "static", 1, isset($edit->static) ? $edit->static : variable_get("node_static_$edit->type", 0)); + $output .= form_checkbox(t("Create new revision"), "revision", 1, isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0)); $output .= implode("", node_invoke_all($edit, "nodeapi", "form admin")); - $output .= form_select(t("Create new revision"), "revision", isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0), array(t("Disabled"), t("Enabled"))); } $output .= " "; diff --git a/modules/node/node.module b/modules/node/node.module index 5d916d04e7c..09db9f19e63 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1102,12 +1102,12 @@ function node_form($edit, $error = NULL) { $output .= form_textfield(t("Authored by"), "name", $edit->name, 20, 60, $error["name"]); $output .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]); $output .= "
"; - $output .= form_select(t("Set public/published"), "status", isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1), array(t("Disabled"), t("Enabled"))); - $output .= form_select(t("Promote to front page"), "promote", isset($edit->promote) ? $edit->promote : variable_get("node_promote_$edit->type", 1), array(t("Disabled"), t("Enabled"))); - $output .= form_select(t("Moderation status"), "moderate", isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0), array(t("Approved"), t("Awaiting approval"))); - $output .= form_select(t("Static on front page"), "static", isset($edit->static) ? $edit->static : variable_get("node_static_$edit->type", 0), array(t("Disabled"), t("Enabled"))); + $output .= form_checkbox(t("Published"), "status", 1, isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1)); + $output .= form_checkbox(t("Approved"), "moderate", 1, isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0)); + $output .= form_checkbox(t("Promoted to front page"), "promote", 1, isset($edit->promote) ? $edit->promote : variable_get("node_promote_$edit->type", 1)); + $output .= form_checkbox(t("Static on front page"), "static", 1, isset($edit->static) ? $edit->static : variable_get("node_static_$edit->type", 0)); + $output .= form_checkbox(t("Create new revision"), "revision", 1, isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0)); $output .= implode("", node_invoke_all($edit, "nodeapi", "form admin")); - $output .= form_select(t("Create new revision"), "revision", isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0), array(t("Disabled"), t("Enabled"))); } $output .= " ";