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_EditClientStepOne extends Horde_Form
15: {
16: public function __construct(&$vars)
17: {
18: parent::__construct($vars, 'editclientstep1form');
19:
20: try {
21: $clients = Hermes::listClients();
22: if (count($clients)) {
23: $subtype = 'enum';
24: $type_params = array($clients);
25: } else {
26: $subtype = 'invalid';
27: $type_params = array(_("There are no clients to edit"));
28: }
29: } catch (Hermes_Exception $e) {
30: $subtype = 'invalid';
31: $type_params = array($clients->getMessage());
32: }
33:
34: $this->addVariable(_("Client Name"), 'client', $subtype, true, false, null, $type_params);
35: }
36:
37: }