Overview

Packages

  • Horde
    • Form
    • MIME
      • Viewer
    • Scheduler
  • None
  • Whups
    • UnitTests

Classes

  • Whups_Application
  • Whups_Block_Myqueries
  • Whups_Block_Myrequests
  • Whups_Block_Mytickets
  • Whups_Block_Query
  • Whups_Block_Queuecontents
  • Whups_Block_Queuesummary
  • Whups_Block_Unassigned
  • Whups_Driver_sql
  • Whups_Exception
  • Whups_Factory_Driver
  • Whups_Form_AddListener
  • Whups_Form_DeleteListener
  • Whups_Form_Queue_StepOne
  • Whups_Form_Queue_StepThree
  • Whups_Form_Queue_StepTwo
  • Whups_Form_Renderer_Query
  • Whups_Form_SetTypeStepOne
  • Whups_Form_SetTypeStepTwo
  • Whups_Form_Ticket_Delete
  • Whups_Test_Perms
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  *
 4:  * Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com>
 5:  * Copyright 2001-2012 Horde LLC (http://www.horde.org/)
 6:  *
 7:  * See the enclosed file LICENSE for license information (BSD). If you
 8:  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
 9:  */
10: 
11: /**
12:  * Queue editing forms.
13:  */
14: class Whups_Form_Queue_StepOne extends Horde_Form
15: {
16:     public function __construct(&$vars, $title = '')
17:     {
18:         parent::__construct($vars, $title);
19: 
20:         $this->addHidden('', 'id', 'int', true, true);
21: 
22:         /* Queues. */
23:         $this->addVariable(
24:             _("New Queue"), 'queue', 'enum', true, false, null,
25:             array(Whups::permissionsFilter($GLOBALS['whups_driver']->getQueues(),
26:                                            'queue', Horde_Perms::EDIT)));
27:         $this->addVariable(_("Comment"), 'newcomment', 'longtext', false);
28: 
29:         /* Group restrictions. */
30:         if ($GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin', 'permlevel' => Horde_Perms::EDIT)) ||
31:             $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:hiddenComments', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
32:             $groups = $GLOBALS['injector']->getInstance('Horde_Group');
33:             $mygroups = $groups->listGroups($GLOBALS['registry']->getAuth());
34:             if ($mygroups) {
35:                 foreach (array_keys($mygroups) as $gid) {
36:                     $grouplist[$gid] = $groups->getName($gid, true);
37:                 }
38:                 asort($grouplist);
39:                 $grouplist = array_merge(array(0 => _("Any Group")),
40:                                          $grouplist);
41:                 $this->addVariable(_("Viewable only by members of"), 'group',
42:                                    'enum', true, false, null,
43:                                    array($grouplist));
44:             }
45:         }
46:     }
47: 
48: }
API documentation generated by ApiGen