1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: 12: 13:
14: class Hermes_Form_Admin_DeleteJobType extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: parent::__construct($vars, 'deletejobtypeform');
19:
20: $jobtype = $vars->get('jobtype');
21:
22: try {
23: $info = $GLOBALS['injector']
24: ->getInstance('Hermes_Driver')
25: ->getJobTypeByID($jobtype);
26: } catch (Exception $e) {}
27: $yesnotype = 'enum';
28: $type_params = array(array(0 => _("No"), 1 => _("Yes")));
29:
30: $this->addHidden('', 'jobtype', 'int', true, true);
31:
32: $sname = &$this->addVariable(_("Job Type"), 'name', 'text', false, true);
33: $sname->setDefault($info['name']);
34:
35: $this->addVariable(
36: _("Really delete this job type? This may cause data problems!"),
37: 'yesno',
38: $yesnotype,
39: true,
40: false,
41: null,
42: $type_params);
43: }
44:
45: }