1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: class RecordingDetailsForm extends Horde_Form {
13:
14: function __construct(&$vars)
15: {
16:
17: $formtitle = "Create Recording";
18:
19: $accountname = $vars->account;
20: $title = sprintf(_("$formtitle"));
21: parent::__construct($vars, $title);
22:
23: $this->addHidden('', 'action', 'text', true);
24: $this->addVariable(_("Name"), 'name', 'text', true);
25:
26:
27: return true;
28: }
29:
30: public function execute()
31: {
32: $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
33:
34: $action = $this->_vars->get('action');
35: $account = $this->_vars->get('account');
36: $name = $this->_vars->get('name');
37:
38: $shout->storage->addRecording($account, $name);
39: }
40:
41: }
42:
43: class ConferenceDeleteForm extends Horde_Form
44: {
45: function __construct(&$vars)
46: {
47: $devid = $vars->get('devid');
48: $account = $vars->get('account');
49:
50: $title = _("FIXME Delete Recording %s - Account: %s");
51: $title = sprintf($title, $devid, $GLOBALS['session']->get('shout', 'curaccount_name'));
52:
53: parent::__construct($vars, $title);
54:
55: $this->addHidden('', 'account', 'text', true);
56: $this->addHidden('', 'devid', 'text', true);
57: $this->addHidden('', 'action', 'text', true);
58: $this->setButtons(array(_("Delete"), _("Cancel")));
59: }
60:
61: function execute()
62: {
63: throw new Shout_Exception('FIXME');
64: $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
65: $account = $this->_vars->get('account');
66: $devid = $this->_vars->get('devid');
67: $shout->devices->deleteDevice($account, $devid);
68: }
69: }
70: