1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: 12: 13: 14: 15: 16: 17:
18: class Kronolith_Form_SubscribeRemoteCalendar extends Horde_Form
19: {
20: public function __construct($vars)
21: {
22: parent::__construct($vars, _("Subscribe to a Remote Calendar"));
23:
24: $this->addVariable(_("Name"), 'name', 'text', true);
25: $this->addVariable(_("Color"), 'color', 'colorpicker', false);
26: $this->addVariable(_("URL"), 'url', 'text', true);
27: $this->addVariable(_("Description"), 'desc', 'longtext', false, false, null, array(4, 60));
28: $this->addVariable(_("Username"), 'user', 'text', false);
29: $this->addVariable(_("Password"), 'password', 'password', false);
30:
31: $this->setButtons(array(_("Subscribe")));
32: }
33:
34: 35: 36:
37: public function execute()
38: {
39: $info = array();
40: foreach (array('name', 'url', 'user', 'password', 'color', 'desc') as $key) {
41: $info[$key] = $this->_vars->get($key);
42: }
43: Kronolith::subscribeRemoteCalendar($info);
44: }
45:
46: }
47: