summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-13 00:09:43 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-13 00:09:43 +0000
commit847de449968dfc815066eac719ddacf60639206c (patch)
treebcdb9f46759ce520d79600dae52e579ff8830aee /modules
parent3b52b31c5451bfb4edd92d3f4b0093e51ec2b027 (diff)
Fix the logical inversion of the transparency field. Now, 100% is max
transparency and 1% is min transparency (no transparency at all). Fixes ticket #204.
Diffstat (limited to 'modules')
-rw-r--r--modules/watermark/controllers/admin_watermarks.php2
-rw-r--r--modules/watermark/helpers/watermark.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/watermark/controllers/admin_watermarks.php b/modules/watermark/controllers/admin_watermarks.php
index 54ee71b5..b8f519da 100644
--- a/modules/watermark/controllers/admin_watermarks.php
+++ b/modules/watermark/controllers/admin_watermarks.php
@@ -137,7 +137,7 @@ class Admin_Watermarks_Controller extends Admin_Controller {
"width" => module::get_var("watermark", "width"),
"height" => module::get_var("watermark", "height"),
"position" => module::get_var("watermark", "position"),
- "transparency" => module::get_var("watermark", "transparency")),
+ "transparency" => 101 - module::get_var("watermark", "transparency")),
1000);
}
}
diff --git a/modules/watermark/helpers/watermark.php b/modules/watermark/helpers/watermark.php
index 290ff3d3..b152501b 100644
--- a/modules/watermark/helpers/watermark.php
+++ b/modules/watermark/helpers/watermark.php
@@ -20,7 +20,7 @@
class watermark_Core {
static function get_add_form() {
for ($i = 1; $i <= 100; $i++) {
- $range[$i] = $i;
+ $range[$i] = "$i%";
}
$form = new Forge("admin/watermarks/add", "", "post", array("id" => "gAddWatermarkForm"));
@@ -29,7 +29,7 @@ class watermark_Core {
$group->dropdown("position")->label(t("Watermark Position"))
->options(self::positions())
->selected("southeast");
- $group->dropdown("transparency")->label(t("Transparency Percent"))
+ $group->dropdown("transparency")->label(t("Transparency (100% = completely transparent)"))
->options($range)
->selected(100);
$group->submit("")->value(t("Upload"));
@@ -38,7 +38,7 @@ class watermark_Core {
static function get_edit_form() {
for ($i = 1; $i <= 100; $i++) {
- $range[$i] = $i;
+ $range[$i] = "$i%";
}
$form = new Forge("admin/watermarks/edit", "", "post", array("id" => "gEditWatermarkForm"));
@@ -46,7 +46,7 @@ class watermark_Core {
$group->dropdown("position")->label(t("Watermark Position"))
->options(self::positions())
->selected(module::get_var("watermark", "position"));
- $group->dropdown("transparency")->label(t("Transparency Percent"))
+ $group->dropdown("transparency")->label(t("Transparency (100% = completely transparent)"))
->options($range)
->selected(module::get_var("watermark", "transparency"));
$group->submit("")->value(t("Save"));