Overview

Packages

  • Ansel
  • None

Classes

  • Ansel_Application
  • Ansel_Block_Cloud
  • Ansel_Block_Gallery
  • Ansel_Block_MyGalleries
  • Ansel_Block_RandomPhoto
  • Ansel_Block_RecentComments
  • Ansel_Block_RecentFaces
  • Ansel_Block_Recentlyadded
  • Ansel_Block_RecentlyAddedGeodata
  • Ansel_Config
  • Ansel_Form_Watermark
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Copyright 2003-2012 Horde LLC (http://www.horde.org/)
 4:  *
 5:  * See the enclosed file COPYING for license information (GPL). If you
 6:  * did not receive this file, see http://www.horde.org/licenses/gpl.
 7:  *
 8:  * @author Chuck Hagenbuch <chuck@horde.org>
 9:  * @pacakge Ansel
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: 
API documentation generated by ApiGen