1: <?php
2: /**
3: * This file contains all Horde_Form classes for ticket type administration.
4: *
5: * Copyright 2002-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file LICENSE for license information (BSD). If you
8: * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
9: *
10: * @author Chuck Hagenbuch <chuck@horde.org>
11: * @package Whups
12: */
13: class Whups_Form_Admin_EditTypeStepOne extends Horde_Form
14: {
15: public function __construct(&$vars)
16: {
17: global $whups_driver;
18:
19: parent::__construct($vars, _("Edit or Delete Types"));
20: $this->setButtons(
21: array(
22: _("Edit Type"),
23: _("Clone Type"),
24: _("Delete Type")));
25:
26: $types = $whups_driver->getAllTypes();
27: if ($types) {
28: $ttype = 'enum';
29: $type_params = array($types);
30: } else {
31: $ttype = 'invalid';
32: $type_params = array(_("There are no types to edit"));
33: }
34:
35: $this->addVariable(
36: _("Type Name"), 'type', $ttype, true, false, null, $type_params);
37: }
38:
39: }