Inheritance: extends BaseActiveRecordVersioned
 protected function beforeAction($action)
 {
     $this->admin = new Admin(OphInLabResults_Type::model(), $this);
     $this->admin->setModelDisplayName('Lab Result Type');
     return parent::beforeAction($action);
 }
 * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
 * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>
<section class="element-fields lab-results-type">
    <div class="fields-row">
        <div class="row field-row">
            <div class="large-2 column">
                <label for="Element_OphInLabResults_Details_result_type_id">Type:</label>
            </div>
            <div class="large-4 column end">
                <select name="Element_OphInLabResults_Details[result_type_id]" id="Element_OphInLabResults_Details_result_type_id">
                    <option>- Please select -</option>
                    <?php 
foreach (OphInLabResults_Type::model()->findAll() as $type) {
    ?>
                        <option
                            data-element-id="<?php 
    echo $type->result_element_id;
    ?>
"
                            value="<?php 
    echo $type->id;
    ?>
"
                            <?php 
    echo $type->id === $element->result_type_id ? 'selected' : '';
    ?>
                        >
                            <?php