Overview

Packages

  • Hermes
  • Horde
    • Data
  • Kronolith
  • None

Classes

  • Hermes
  • Hermes_Ajax_Application
  • Hermes_Api
  • Hermes_Driver
  • Hermes_Driver_Sql
  • Hermes_Factory_Driver
  • Hermes_Form_Admin_AddJobType
  • Hermes_Form_Admin_DeleteJobType
  • Hermes_Form_Admin_EditClientStepOne
  • Hermes_Form_Admin_EditClientStepTwo
  • Hermes_Form_Admin_EditJobTypeStepOne
  • Hermes_Form_Admin_EditJobTypeStepTwo
  • Hermes_Form_Deliverable
  • Hermes_Form_Deliverable_ClientSelector
  • Hermes_Form_Export
  • Hermes_Form_JobType_Edit_Step1
  • Hermes_Form_Search
  • Hermes_Form_Time
  • Hermes_Form_Time_Entry
  • Hermes_LoginTasks_SystemTask_Upgrade
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Copyright 2002-2012 Horde LLC (http://www.horde.org/)
 4:  *
 5:  * See the enclosed file LICENSE for license information (BSD). If you
 6:  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
 7:  *
 8:  * @author Chuck Hagenbuch <chuck@horde.org>
 9:  */
10: 
11: /**
12:  * @package Hermes
13:  */
14: class Hermes_Form_Admin_EditClientStepTwo extends Horde_Form
15: {
16: 
17:     public function __construct(&$vars)
18:     {
19:         parent::__construct($vars, 'editclientstep2form');
20: 
21:         $client = $vars->get('client');
22:         try {
23:             $info = $GLOBALS['injector']
24:                 ->getInstance('Hermes_Driver')
25:                 ->getClientSettings($client);
26:         } catch (Hermes_Exception $e) {}
27:         if (!$info) {
28:             $stype = 'invalid';
29:             $type_params = array(_("This is not a valid client."));
30:         } else {
31:             $stype = 'text';
32:             $type_params = array();
33:         }
34: 
35:         $this->addHidden('', 'client', 'text', true, true);
36:         $name = &$this->addVariable(_("Client"), 'name', $stype, false, true, null, $type_params);
37:         $name->setDefault($info['name']);
38: 
39:         $enterdescription = &$this->addVariable(sprintf(_("Should users enter descriptions of their timeslices for this client? If not, the description will automatically be \"%s\"."), _("See Attached Timesheet")), 'enterdescription', 'boolean', true);
40:         if (!empty($info['enterdescription'])) {
41:             $enterdescription->setDefault($info['enterdescription']);
42:         }
43: 
44:         $exportid = &$this->addVariable(_("ID for this client when exporting data, if different from the name displayed above."), 'exportid', 'text', false);
45:         if (!empty($info['exportid'])) {
46:             $exportid->setDefault($info['exportid']);
47:         }
48:     }
49: 
50: }
51: 
API documentation generated by ApiGen