Permalink
Browse files

Add error messages to theme::get_edit_form_admin()

  • Loading branch information...
1 parent c9edb94 commit 886337e1dd1380b3382eebe38ee789a14123c69f @bharat bharat committed Apr 11, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 modules/gallery/helpers/theme.php
@@ -73,12 +73,18 @@ static function get_edit_form_admin() {
$group = $form->group("edit_theme");
$group->input("page_size")->label(t("Items per page"))->id("g-page-size")
->rules("required|valid_digit")
+ ->error_messages("required", t("You must enter a number"))
+ ->error_messages("valid_digit", t("You must enter a number"))
->value(module::get_var("gallery", "page_size"));
$group->input("thumb_size")->label(t("Thumbnail size (in pixels)"))->id("g-thumb-size")
->rules("required|valid_digit")
+ ->error_messages("required", t("You must enter a number"))
+ ->error_messages("valid_digit", t("You must enter a number"))
->value(module::get_var("gallery", "thumb_size"));
$group->input("resize_size")->label(t("Resized image size (in pixels)"))->id("g-resize-size")
->rules("required|valid_digit")
+ ->error_messages("required", t("You must enter a number"))
+ ->error_messages("valid_digit", t("You must enter a number"))
->value(module::get_var("gallery", "resize_size"));
$group->textarea("header_text")->label(t("Header text"))->id("g-header-text")
->value(module::get_var("gallery", "header_text"));

0 comments on commit 886337e

Please sign in to comment.