diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-26 01:32:12 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-26 01:32:12 +0000 |
commit | 0fc14c1bfc799615b092f29648ab3816f1a07052 (patch) | |
tree | b21968c4a00845cdb8b4835d4c011f4c4b03d4f1 /modules/watermark/helpers | |
parent | eb35afc987a4e8b2772d10ac2bd63b1a3a091239 (diff) |
Simplify the watermark module. We can now upload, edit and delete one
watermark. The UI is rough and we don't yet apply the watermark to
images.. that's next.
Diffstat (limited to 'modules/watermark/helpers')
-rw-r--r-- | modules/watermark/helpers/watermark.php | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/modules/watermark/helpers/watermark.php b/modules/watermark/helpers/watermark.php index 6d8da35a..c17bf0ab 100644 --- a/modules/watermark/helpers/watermark.php +++ b/modules/watermark/helpers/watermark.php @@ -18,22 +18,35 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class watermark_Core { - public static function get_watermark_form() { - $form = new Forge("admin/watermarks", "", "post"); + public static function get_add_form() { + $form = new Forge("admin/watermarks/upload", "", "post"); $group = $form->group("add_watermark")->label(_("Upload Watermark")); $group->upload("file")->label(_("Watermark"))->rules("allow[jpg,png,gif]|size[1MB]|required"); + $group->dropdown("position")->label(_("Watermark Position")) + ->options(array("northwest", "north", "northeast", + "west", "center", "east", + "southwest", "south", "southeast")) + ->selected("8"); $group->submit(_("Upload")); return $form; } - public static function get_watermark_position_form($position="southeast") { - $form = new Forge("admin/watermark/position", "", "post"); - $group = $form->group("watermark_position")->label(_("Update Position")); + public static function get_edit_form() { + $form = new Forge("admin/watermarks/edit", "", "post"); + $group = $form->group("edit_watermark")->label(_("Edit Watermark")); $group->dropdown("position")->label(_("Watermark Position")) ->options(array("northwest", "north", "northeast", "west", "center", "east", "southwest", "south", "southeast")) ->selected("8"); + $group->submit(_("Modify")); + return $form; + } + + public static function get_delete_form() { + $form = new Forge("admin/watermarks/delete", "", "post"); + $group = $form->group("delete_watermark")->label(_("Delete Watermark")); + $group->submit(_("Delete")); return $form; } }
\ No newline at end of file |