1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11: class DeleteRecord extends Horde_Form
12: {
13: 14:
15: function DeleteRecord(&$vars)
16: {
17: parent::Horde_Form($vars, _("Are you sure you want to delete this record?"));
18:
19: $rectype = $vars->get('rectype');
20: $types = Beatnik::getRecTypes();
21:
22: $this->addHidden('', 'id', 'text', $vars->get('id'));
23: $this->addHidden('', 'curdomain', 'text', $vars->get('curdomain'));
24: $this->addHidden('', 'rectype', 'text', $vars->get('rectype'));
25: $this->addVariable(_("Type"), 'rectype', 'text', false, true);
26:
27: $recset = Beatnik::getRecFields($rectype);
28: foreach ($recset as $field => $fdata) {
29: if ($fdata['type'] != 'hidden' && ($fdata['infoset'] == 'basic' || $_SESSION['beatnik']['expertmode'])) {
30: $this->addVariable(_($fdata['description']), $field, $fdata['type'], false, true);
31: }
32:
33: }
34:
35: $this->setButtons(array(_("Delete"), _("Cancel")));
36:
37: return true;
38: }
39: }
40: