1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11: class Ansel_Form_Watermark extends Horde_Form
12: {
13: protected $_useFormToken = false;
14:
15: public function __construct(&$vars, $title)
16: {
17: global $gallery, $prefs;
18:
19: parent::Horde_Form($vars, $title);
20:
21: $this->setButtons(_("Save"));
22: $this->addHidden('', 'actionID', 'text', false);
23: $this->addHidden('', 'gallery', 'text', false);
24: $this->addHidden('', 'image', 'text', false);
25: $this->addHidden('', 'page', 'text', false);
26:
27: $w = &$this->addVariable(_("Custom Watermark"), 'watermark', 'text',
28: false, false, null);
29: $w->setDefault($prefs->getValue('watermark_text'));
30:
31: $fonts = array('tiny' => _("Tiny"),
32: 'small' => _("Small"),
33: 'medium' => _("Medium"),
34: 'large' => _("Large"),
35: 'giant' => _("Giant"));
36: $f = &$this->addVariable(_("Watermark Font"), 'font', 'enum', false,
37: false, null, array($fonts));
38: $f->setDefault($prefs->getValue('watermark_font'));
39:
40: $ha = array('left' => _("Left"),
41: 'center' => _("Center"),
42: 'right' => _("Right"));
43: $wha = &$this->addVariable(_("Horizontal Alignment"), 'whalign', 'enum',
44: false, false, null, array($ha));
45: $wha->setDefault($prefs->getValue('watermark_horizontal'));
46:
47: $va = array('top' => _("Top"),
48: 'center' => _("Center"),
49: 'bottom' => _("Bottom"));
50: $wva = &$this->addVariable(_("Vertical Alignment"), 'wvalign', 'enum',
51: false, false, null, array($va));
52: $wva->setDefault($prefs->getValue('watermark_vertical'));
53: }
54:
55: }
56: