Overview

Packages

  • Nag
  • None

Classes

  • Horde_Core_Ui_VarRenderer_Nag
  • Nag
  • Nag_Ajax_Application
  • Nag_Api
  • Nag_Driver
  • Nag_Driver_Kolab
  • Nag_Driver_Sql
  • Nag_Exception
  • Nag_Factory_Tasklists
  • Nag_Form_CreateTaskList
  • Nag_Form_DeleteTaskList
  • Nag_Form_EditTaskList
  • Nag_Form_Renderer_Task
  • Nag_Form_Task
  • Nag_Form_Type_NagAlarm
  • Nag_Form_Type_NagDue
  • Nag_Form_Type_NagMethod
  • Nag_Form_Type_NagStart
  • Nag_Task
  • Nag_Tasklists_Base
  • Nag_Tasklists_Default
  • Nag_Tasklists_Kolab
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Horde_Form for creating task lists.
 4:  *
 5:  * See the enclosed file COPYING for license information (GPL). If you
 6:  * did not receive this file, see http://www.horde.org/licenses/gpl.
 7:  *
 8:  * @package Nag
 9:  */
10: /**
11:  * The Nag_CreateTaskListForm class provides the form for
12:  * creating a task list.
13:  *
14:  * @author  Chuck Hagenbuch <chuck@horde.org>
15:  * @package Nag
16:  */
17: class Nag_Form_CreateTaskList extends Horde_Form
18: {
19:     public function __construct($vars)
20:     {
21:         parent::__construct($vars, _("Create Task List"));
22: 
23:         $this->addVariable(_("Name"), 'name', 'text', true);
24:         $this->addVariable(_("Color"), 'color', 'colorpicker', false);
25:         $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
26:         if ($GLOBALS['registry']->isAdmin()) {
27:             $this->addVariable(
28:                 _("System Task List"), 'system', 'boolean', false, false,
29:                 _("System task lists don't have an owner. Only administrators can change the task list settings and permissions."));
30:         }
31: 
32:         $this->setButtons(array(_("Create")));
33:     }
34: 
35:     public function execute()
36:     {
37:         $info = array();
38:         foreach (array('name', 'color', 'description', 'system') as $key) {
39:             $info[$key] = $this->_vars->get($key);
40:         }
41:         return Nag::addTasklist($info);
42:     }
43: 
44: }
45: 
API documentation generated by ApiGen