Commit 48a4dff8 authored by Dries's avatar Dries

- Patch by Goba: added form descriptions where appropriate and removed some
  duplicated code from the comment module.
parent 29428668
......@@ -139,10 +139,6 @@ function comment_settings() {
function comment_user($type, $edit, &$user) {
switch ($type) {
case "view_public":
if ($user->signature) {
return form_item(t("Signature"), check_output($user->signature));
}
break;
case "view_private":
if ($user->signature) {
return form_item(t("Signature"), check_output($user->signature));
......@@ -909,7 +905,7 @@ function comment_admin_edit($id) {
if ($comment) {
$form .= form_item(t("Author"), format_name($comment));
$form .= form_textfield(t("Subject"), "subject", $comment->subject, 70, 128);
$form .= form_textarea(t("Comment"), "comment", $comment->comment, 70, 15);
$form .= form_textarea(t("Comment"), "comment", $comment->comment, 70, 15, filter_tips_short());
$form .= form_radios(t("Status"), "status", $comment->status, array("published", "not published"));
$form .= form_hidden("cid", $id);
$form .= form_submit(t("Submit"));
......
......@@ -139,10 +139,6 @@ function comment_settings() {
function comment_user($type, $edit, &$user) {
switch ($type) {
case "view_public":
if ($user->signature) {
return form_item(t("Signature"), check_output($user->signature));
}
break;
case "view_private":
if ($user->signature) {
return form_item(t("Signature"), check_output($user->signature));
......@@ -909,7 +905,7 @@ function comment_admin_edit($id) {
if ($comment) {
$form .= form_item(t("Author"), format_name($comment));
$form .= form_textfield(t("Subject"), "subject", $comment->subject, 70, 128);
$form .= form_textarea(t("Comment"), "comment", $comment->comment, 70, 15);
$form .= form_textarea(t("Comment"), "comment", $comment->comment, 70, 15, filter_tips_short());
$form .= form_radios(t("Status"), "status", $comment->status, array("published", "not published"));
$form .= form_hidden("cid", $id);
$form .= form_submit(t("Submit"));
......
......@@ -218,7 +218,7 @@ function forum_form(&$node, &$error) {
$output .= form_checkbox(t("Leave shadow copy"), "shadow", 1, $node->shadow, t("If you move this topic, you can leave a link in the old forum to the new forum."));
}
$output .= form_textarea(t("Body"), "body", $node->body, 60, 10);
$output .= form_textarea(t("Body"), "body", $node->body, 60, 10, filter_tips_short());
return $output;
}
......@@ -288,7 +288,7 @@ function forum_get_forums($tid = 0) {
else {
$forums = unserialize($cache->data);
}
return $forums;
}
......
......@@ -218,7 +218,7 @@ function forum_form(&$node, &$error) {
$output .= form_checkbox(t("Leave shadow copy"), "shadow", 1, $node->shadow, t("If you move this topic, you can leave a link in the old forum to the new forum."));
}
$output .= form_textarea(t("Body"), "body", $node->body, 60, 10);
$output .= form_textarea(t("Body"), "body", $node->body, 60, 10, filter_tips_short());
return $output;
}
......@@ -288,7 +288,7 @@ function forum_get_forums($tid = 0) {
else {
$forums = unserialize($cache->data);
}
return $forums;
}
......
......@@ -127,7 +127,7 @@ function page_form(&$node, &$error) {
$output .= implode("", taxonomy_node_form("page", $node));
}
$output .= form_textarea(t("Body"), "body", $node->body, 60, 20);
$output .= form_textarea(t("Body"), "body", $node->body, 60, 20, filter_tips_short());
$output .= form_textfield(t("Link name"), "link", $node->link, 60, 64, t("To make the page show up in the navigation links, enter the name of the link, otherwise leave blank."));
$output .= form_textfield(t("Link description"), "description", $node->description, 60, 64, t("The description displayed when hovering over the page's link. Leave blank when you don't want a description."));
$output .= form_radios(t("Type"), "format", $node->format, array(0 => "HTML", 1 => "PHP"));
......
......@@ -127,7 +127,7 @@ function page_form(&$node, &$error) {
$output .= implode("", taxonomy_node_form("page", $node));
}
$output .= form_textarea(t("Body"), "body", $node->body, 60, 20);
$output .= form_textarea(t("Body"), "body", $node->body, 60, 20, filter_tips_short());
$output .= form_textfield(t("Link name"), "link", $node->link, 60, 64, t("To make the page show up in the navigation links, enter the name of the link, otherwise leave blank."));
$output .= form_textfield(t("Link description"), "description", $node->description, 60, 64, t("The description displayed when hovering over the page's link. Leave blank when you don't want a description."));
$output .= form_radios(t("Type"), "format", $node->format, array(0 => "HTML", 1 => "PHP"));
......
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