1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: 13: 14: 15: 16: 17: 18: 19:
20: class Hermes_Form_Export extends Horde_Form
21: {
22: protected $_useFormToken = false;
23:
24: public function __construct(&$vars)
25: {
26: $perms = $GLOBALS['injector']->getInstance('Horde_Perms');;
27: parent::Horde_Form($vars, _("Export Search Results"));
28:
29: $formats = array(
30: 'Hermescsv' => _("Comma-Separated Variable (.csv)"),
31: 'Hermesxls' => _("Microsoft Excel (.xls)"),
32: 'Iif' => _("QuickBooks (.iif)"),
33: 'Hermestsv' => _("Tab-Separated Variable (.tsv, .txt)"),
34: );
35:
36: $this->addVariable(_("Select the export format"), 'format', 'enum',
37: true, false, null, array($formats));
38:
39: if ($perms->hasPermission('hermes:review', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
40: $yesno = array('yes' => _("Yes"),
41: 'no' => _("No"));
42: $var = &$this->addVariable(_("Mark the time as exported?"),
43: 'mark_exported', 'enum', true, false,
44: null, array($yesno));
45: $var->setDefault('no');
46: }
47:
48: $this->setButtons(_("Export"));
49: }
50:
51: }
52: