1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: class Whups_Form_Admin_DeleteAttribute extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: parent::__construct($vars, _("Delete Attribute Confirmation"));
19:
20: $attribute = $vars->get('attribute');
21: $info = $GLOBALS['whups_driver']->getAttributeDesc($attribute);
22:
23: $this->addHidden('', 'type', 'int', true, true);
24: $this->addHidden('', 'attribute', 'int', true, true);
25: $pname = &$this->addVariable(
26: _("Attribute Name"), 'attribute_name', 'text', false, true);
27: $pname->setDefault($info['name']);
28: $pdesc = &$this->addVariable(
29: _("Attribute Description"), 'attribute_description', 'text', false,
30: true);
31: $pdesc->setDefault($info['description']);
32: $this->addVariable(
33: _("Really delete this attribute? This may cause data problems!"),
34: 'yesno', 'enum', true, false, null,
35: array(array(0 => _("No"), 1 => _("Yes"))));
36: }
37:
38: }
39: