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 license renewals.
26
* @author Luke Duncan <lduncan@intrahealth.org>
27
* @copyright Copyright © 2007, 2008 IntraHealth International, Inc.
33
* Page object to handle the renewal of licenses.
39
class iHRIS_PageFormFacilityRenew extends iHRIS_PageFormParentPrivateFacility {
42
* Load the HTML template files for editing.
44
protected function loadHTMLTemplates() {
45
I2CE_PageForm::loadHTMLTemplates();
46
//$this->template->appendFileById( "menu_view_facility.html", "li", "navBarUL", true );
47
$this->template->appendFileById( "form_facility_renew.html", "tbody", "privatefacility_form" );
50
* Set the data to be displayed for the page.
52
protected function setDisplayData() {
53
I2CE_PageForm::setDisplayData();
54
$this->template->setDisplayData( "privatefacility_header", $this->getTitle() );
55
$this->template->setDisplayData( "privatefacility_form", "facility_renew" );
60
* Create and load data for the objects used for this form.
62
protected function loadObjects() {
63
parent::loadObjects();
64
if ( !$this->isPost() ) {
65
$parent = $this->getParent();
66
$parent->populateLast( array( "facility_license" => "end_date" ) );
67
$last = current( $parent->children['facility_license'] );
69
$this->getPrimary()->license_number = $last->license_number;
77
# c-default-style: "bsd"
78
# indent-tabs-mode: nil