Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : OphCiExamination_Risks_Assignment | ||
return | OphCiExamination_Risks_Assignment | the static model class |
<div class="sub-element-fields" id="div_<?php echo CHtml::modelName($element); ?> _injection"> <div class="row field-row"> <div class="large-3 column"> <label> <?php echo $element->getAttributeLabel('injection_status_id'); ?> : </label> </div> <div class="large-9 column"> <?php $options = \OEModule\OphCiExamination\models\OphCiExamination_Management_Status::model()->activeOrPk($element->injection_status_id)->findAll(); $html_options = array('empty' => '- Please select -', 'options' => array()); foreach ($options as $opt) { $html_options['options'][(string) $opt->id] = array('data-deferred' => $opt->deferred, 'data-book' => $opt->book, 'data-event' => $opt->event); } echo CHtml::activeDropDownList($element, 'injection_status_id', CHtml::listData($options, 'id', 'name'), $html_options); ?> </div> </div> </div> <div class="sub-element-fields" id="div_<?php echo CHtml::modelName($element); ?> _injection_deferralreason"<?php if (!($element->injection_status && $element->injection_status->deferred)) {
* * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 * (C) OpenEyes Foundation, 2011-2012 * This file is part of OpenEyes. * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>. * * @link http://www.openeyes.org.uk * * @author OpenEyes <*****@*****.**> * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust * @copyright Copyright (c) 2011-2012, OpenEyes Foundation * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0 */ $statuses = \OEModule\OphCiExamination\models\OphCiExamination_Management_Status::model()->activeOrPk(array($element->left_laser_status_id, $element->right_laser_status_id))->findAll(); $status_options = array('empty' => '- Please select -', 'options' => array()); foreach ($statuses as $opt) { $status_options['options'][(string) $opt->id] = array('data-deferred' => $opt->deferred, 'data-book' => $opt->book, 'data-event' => $opt->event); } $deferrals = \OEModule\OphCiExamination\models\OphCiExamination_Management_DeferralReason::model()->activeOrPk(array($element->left_laser_deferralreason_id, $element->right_laser_deferralreason_id))->findAll(); $deferral_options = array('empty' => '- Please select -', 'options' => array()); foreach ($deferrals as $opt) { $deferral_options['options'][(string) $opt->id] = array('data-other' => $opt->other); } $lasertypes = \OEModule\OphCiExamination\models\OphCiExamination_LaserManagement_LaserType::model()->activeOrPk(array($element->right_lasertype_id, $element->left_lasertype_id))->findAll(); $lasertype_options = array(); foreach ($lasertypes as $lt) { $lasertype_options[(string) $lt->id] = array('data-other' => $lt->other); } ?>
* @copyright Copyright (c) 2011-2013, OpenEyes Foundation * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0 */ ?> <?php // Work out what to show in the form $show_deferral = false; $show_deferral_other = false; $show_treatment = false; $show_booking_hint = false; $show_event_hint = false; $status = null; $deferralreason = null; if (@$_POST[$model_name]) { $status = \OEModule\OphCiExamination\models\OphCiExamination_Management_Status::model()->findByPk(@$_POST[$model_name][$side . '_laser_status_id']); if ($deferral_id = @$_POST[$model_name][$side . '_laser_deferralreason_id']) { $deferralreason = \OEModule\OphCiExamination\models\OphCiExamination_Management_DeferralReason::model()->findByPk($deferral_id); } } else { $status = $element->{$side . '_laser_status'}; $deferralreason = $element->{$side . '_laser_deferralreason'}; } if ($status) { if ($status->deferred) { $show_deferral = true; } elseif ($status->book) { $show_treatment = true; $show_booking_hint = true; } elseif ($status->event) { $show_treatment = true;