Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add error messages to theme::get_edit_form_admin()

  • Loading branch information...
commit 886337e1dd1380b3382eebe38ee789a14123c69f 1 parent c9edb94
Bharat Mediratta bharat authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 modules/gallery/helpers/theme.php
6 modules/gallery/helpers/theme.php
View
@@ -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"));
Please sign in to comment.
Something went wrong with that request. Please try again.