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: class Whups_Form_Queue_StepTwo extends Horde_Form
12: {
13:     public function __construct(&$vars, $title = '')
14:     {
15:         global $whups_driver;
16: 
17:         parent::__construct($vars, $title);
18: 
19:         $this->addHidden('', 'id', 'int', true, true);
20:         $this->addHidden('', 'group', 'int', false, true);
21:         $this->addHidden('', 'queue', 'int', true, true);
22:         $this->addHidden('', 'newcomment', 'longtext', false, true);
23: 
24:         /* Give the user an opportunity to check that type, version,
25:          * etc. are still valid. */
26: 
27:         $queue = $vars->get('queue');
28: 
29:         $info = $whups_driver->getQueue($queue);
30:         if (!empty($info['versioned'])) {
31:             $versions = $whups_driver->getVersions($vars->get('queue'));
32:             if (count($versions) == 0) {
33:                 $vtype = 'invalid';
34:                 $v_params = array(_("This queue requires that you specify a version, but there are no versions associated with it. Until versions are created for this queue, you will not be able to create tickets."));
35:             } else {
36:                 $vtype = 'enum';
37:                 $v_params = array($versions);
38:             }
39:             $this->addVariable(_("Queue Version"), 'version', $vtype, true, false, null, $v_params);
40:         }
41: 
42:         $this->addVariable(_("Type"), 'type', 'enum', true, false, null, array($whups_driver->getTypes($queue)));
43:     }
44: 
45: }
API documentation generated by ApiGen