summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc3
-rw-r--r--modules/comment.module2
-rw-r--r--modules/comment/comment.module2
-rw-r--r--modules/node.module13
-rw-r--r--modules/node/node.module13
5 files changed, 21 insertions, 12 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 435318165..a0aa2d13a 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -905,6 +905,9 @@ function form($form, $method = "post", $action = 0, $options = 0) {
function form_item($title, $value, $description = 0) {
return "<div class=\"form-item\">". ($title ? "<div class=\"title\">$title:</div>" : "") . $value . ($description ? "<div class=\"description\">$description</div>" : "") ."</div>\n";
}
+function form_group($legend, $group, $description = 0) {
+ return "<fieldset>" . ($legend ? "<legend>$legend</legend>" : "") . $group . ($description ? "<div class=\"description\">$description</div>" : "") . "</fieldset>\n";
+}
function form_radio($title, $name, $value = 1, $checked = 0, $description = 0, $attributes = 0) {
return form_item(0, "<input type=\"radio\" class=\"form-radio\" name=\"edit[$name]\" value=\"". $value ."\"". ($checked ? " checked=\"checked\"" : "") . drupal_attributes($attributes) ." /> $title", $description);
diff --git a/modules/comment.module b/modules/comment.module
index 4f81d029f..8e5a2e7e0 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -1627,7 +1627,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
$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);
+ return form_group(t("User comments"), $output);
}
break;
case "validate":
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 4f81d029f..8e5a2e7e0 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1627,7 +1627,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
$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);
+ return form_group(t("User comments"), $output);
}
break;
case "validate":
diff --git a/modules/node.module b/modules/node.module
index e611697ea..b040a7aac 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1127,10 +1127,13 @@ function node_form($edit, $error = NULL) {
if (user_access("administer nodes")) {
$output .= "<div class=\"admin\">";
+
+ $author = form_textfield(t("Authored by"), "name", $edit->name, 20, 60, $error["name"]);
+ $author .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]);
+
$output .= "<div class=\"authored\">";
- $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 .= "</div>";
+ $output .= form_group(t("Authoring information"), $author);
+ $output .= "</div>\n";
$options .= form_checkbox(t("Published"), "status", 1, isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1));
$options .= form_checkbox(t("In moderation queue"), "moderate", 1, isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0));
@@ -1139,8 +1142,8 @@ function node_form($edit, $error = NULL) {
$options .= form_checkbox(t("Create new revision"), "revision", 1, isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0));
$output .= "<div class=\"options\">";
- $output .= form_item(t("Options"), $options);
- $output .= "</div>";
+ $output .= form_group("Options", $options);
+ $output .= "</div>\n";
$extras .= implode("</div><div class=\"extra\">", node_invoke_nodeapi($edit, "form admin"));
$output .= $extras ? "<div class=\"extra\">$extras</div></div>" : "</div>";
diff --git a/modules/node/node.module b/modules/node/node.module
index e611697ea..b040a7aac 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1127,10 +1127,13 @@ function node_form($edit, $error = NULL) {
if (user_access("administer nodes")) {
$output .= "<div class=\"admin\">";
+
+ $author = form_textfield(t("Authored by"), "name", $edit->name, 20, 60, $error["name"]);
+ $author .= form_textfield(t("Authored on"), "date", $edit->date, 20, 25, $error["date"]);
+
$output .= "<div class=\"authored\">";
- $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 .= "</div>";
+ $output .= form_group(t("Authoring information"), $author);
+ $output .= "</div>\n";
$options .= form_checkbox(t("Published"), "status", 1, isset($edit->status) ? $edit->status : variable_get("node_status_$edit->type", 1));
$options .= form_checkbox(t("In moderation queue"), "moderate", 1, isset($edit->moderate) ? $edit->moderate : variable_get("node_moderate_$edit->type", 0));
@@ -1139,8 +1142,8 @@ function node_form($edit, $error = NULL) {
$options .= form_checkbox(t("Create new revision"), "revision", 1, isset($edit->revision) ? $edit->revision : variable_get("node_revision_$edit->type", 0));
$output .= "<div class=\"options\">";
- $output .= form_item(t("Options"), $options);
- $output .= "</div>";
+ $output .= form_group("Options", $options);
+ $output .= "</div>\n";
$extras .= implode("</div><div class=\"extra\">", node_invoke_nodeapi($edit, "form admin"));
$output .= $extras ? "<div class=\"extra\">$extras</div></div>" : "</div>";