Skip to content

Commit

Permalink
Localize the error strings in watermark::get_add_form(). Fix for tick…
Browse files Browse the repository at this point in the history
…et #1230.
  • Loading branch information
bharat committed Jul 20, 2010
1 parent 6899af3 commit b4b2ef9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/watermark/helpers/watermark.php
Expand Up @@ -24,9 +24,12 @@ static function get_add_form() {
}

$form = new Forge("admin/watermarks/add", "", "post", array("id" => "g-add-watermark-form"));
$group = $form->group("add_watermark")->label(t("Upload Watermark"));
$group->upload("file")->label(t("Watermark"))->rules("allow[jpg,png,gif]|size[1MB]|required");
$group->dropdown("position")->label(t("Watermark Position"))
$group = $form->group("add_watermark")->label(t("Upload watermark"));
$group->upload("file")->label(t("Watermark"))->rules("allow[jpg,png,gif]|size[1MB]|required")
->error_messages("required", "You must select a watermark")
->error_messages("invalid_type", "The watermark must be a JPG, GIF or PNG")
->error_messages("max_size", "The watermark is too big (1 MB max)");
$group->dropdown("position")->label(t("Watermark position"))
->options(self::positions())
->selected("southeast");
$group->dropdown("transparency")->label(t("Transparency (100% = completely transparent)"))
Expand Down

0 comments on commit b4b2ef9

Please sign in to comment.