summaryrefslogtreecommitdiff
path: root/modules/comment/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r--modules/comment/helpers/comment.php26
1 files changed, 1 insertions, 25 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php
index 35685d8c..1e1e7d2f 100644
--- a/modules/comment/helpers/comment.php
+++ b/modules/comment/helpers/comment.php
@@ -65,7 +65,7 @@ class comment_Core {
}
static function get_add_form($item) {
- $form = new Forge("comments", "", "post", array("id" => "g-comment-form"));
+ $form = new Forge("comments/create/{$item->id}", "", "post", array("id" => "g-comment-form"));
$group = $form->group("add_comment")->label(t("Add comment"));
$group->input("name") ->label(t("Name")) ->id("g-author");
$group->input("email") ->label(t("Email (hidden)")) ->id("g-email");
@@ -87,29 +87,5 @@ class comment_Core {
return $form;
}
-
- static function get_edit_form($comment) {
- $form = new Forge("comments/{$comment->id}?_method=put", "", "post",
- array("id" => "g-edit-comment-form"));
- $group = $form->group("edit_comment")->label(t("Edit comment"));
- $group->input("name") ->label(t("Author")) ->id("g-author");
- $group->input("email") ->label(t("Email (hidden)")) ->id("g-email");
- $group->input("url") ->label(t("Website (hidden)"))->id("g-url");
- $group->textarea("text")->label(t("Comment")) ->id("g-text");
- $group->submit("")->value(t("Edit"));
-
- $group->text = $comment->text;
- $author = $comment->author();
- if ($author->guest) {
- $group->inputs["name"]->value = $comment->guest_name;
- $group->email = $comment->guest_email;
- $group->url = $comment->guest_url;
- } else {
- $group->inputs["name"]->value($author->full_name)->disabled("disabled");
- $group->email->value($author->email)->disabled("disabled");
- $group->url->value($author->url)->disabled("disabled");
- }
- return $form;
- }
}