3
* © Copyright 2007, 2008 IntraHealth International, Inc.
5
* This File is part of iHRIS
7
* iHRIS is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
* Manage adding or editing contact details to the database.
26
* @author Luke Duncan <lduncan@intrahealth.org>
27
* @copyright Copyright © 2007, 2008 IntraHealth International, Inc.
33
* Page object to handle the adding or editing contact details to the database.
39
class iHRIS_PageFormContact extends iHRIS_PageFormParentPerson {
43
* Create a new instance of this page.
45
* This will call the parent constructor and then setup the base
46
* template pages for the {@link I2CE_Template template}. It also sets up the values
47
* for the member variables.
48
* @param string $title The title for this page.
49
* @param string $form_name The form name of the form being edited.
50
* @param mixed $access The role required to access this page.
51
* @param array $files The list of template files to load for this page.
53
public function __construct( $args,$request_remainder){
54
$args['page_form'] = 'contact'; //we set it here to avoid an error message but it is not doing antyhign really
55
parent::__construct($args,$request_remainder);
56
if ($this->request_exists('contact_type')) {
57
//we have to do this after the parent contrsuctor is called b/c request/post/get variables have not been processed
58
$form_name = 'person_contact_' . $this->request('contact_type');
59
$args['page_form'] = $form_name;
60
$this->form_name = $form_name;
61
$this->form_link = 'contact?contact_type=' . $this->request('contact_type');
63
I2CE::raiseError("no contact type specified");
74
# c-default-style: "bsd"
75
# indent-tabs-mode: nil