diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-27 23:03:47 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-27 23:03:47 -0800 |
commit | 31e4c217194f8d938c8a6963449d42007663f473 (patch) | |
tree | efafbab13af0d62661c0e133c6840b18b7577758 /modules/comment/helpers | |
parent | 0e5b5e25595dd3dd75222cf8ead58e32f8d5859f (diff) |
Localize error messages.
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r-- | modules/comment/helpers/comment.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 389c8922..c9c20879 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -27,10 +27,20 @@ class comment_Core { static function get_add_form($item) { $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"); - $group->input("url") ->label(t("Website (hidden)"))->id("g-url"); - $group->textarea("text")->label(t("Comment")) ->id("g-text"); + $group->input("name") + ->label(t("Name")) + ->id("g-author") + ->error_messages("required", t("You must enter a name for yourself")); + $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") + ->error_messages("required", t("You must enter a comment")); $group->hidden("item_id")->value($item->id); module::event("comment_add_form", $form); $group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all"); |