The followings are the available columns in table 'ophtroperationnote_cataract_incision_length_default':
Inheritance: extends BaseActiveRecordVersioned
Ejemplo n.º 1
0
 /**
  * Allows a user to delete an incision length.
  *
  * @throws Exception
  */
 public function actionDeleteIncisionLengthDefaults()
 {
     $result = 1;
     if (is_array($_POST['incisionLengths'])) {
         foreach (OphTrOperationnote_CataractIncisionLengthDefault::model()->findAllByPk($_POST['incisionLengths']) as $incisionLength) {
             if (!$incisionLength->delete()) {
                 $result = 0;
             } else {
                 Audit::add('admin', 'delete', $incisionLength->id, null, array('module' => 'OphTrOperationnote', 'model' => 'OphTrOperationnote_IncisionLengthDefault'));
             }
         }
     }
     echo $result;
 }
 protected function afterConstruct()
 {
     if ($this->isNewRecord && isset(Yii::app()->session['selected_firm_id'])) {
         $defaultLengthRecord = OphTrOperationnote_CataractIncisionLengthDefault::model()->findByAttributes(array('firm_id' => (int) Yii::app()->session['selected_firm_id']));
         if ($defaultLengthRecord) {
             $this->length = $defaultLengthRecord->value;
         } elseif (isset(Yii::app()->params['default_incision_length']) && Yii::app()->params['default_incision_length'] !== '') {
             $this->length = Yii::app()->params['default_incision_length'];
         }
     }
     parent::afterConstruct();
 }
Ejemplo n.º 3
0
	<form id="admin_incisionLengths">
		<input type="hidden" name="YII_CSRF_TOKEN" value="<?php 
echo Yii::app()->request->csrfToken;
?>
" />
		<table class="grid">
			<thead>
				<tr>
					<th><input type="checkbox" name="selectall" id="selectall" /></th>
					<th>Value</th>
					<th>Firm ID</th>
				</tr>
			</thead>
			<tbody>
				<?php 
foreach (OphTrOperationnote_CataractIncisionLengthDefault::model()->findAll() as $i => $incisionLength) {
    ?>
					<tr class="clickable" data-id="<?php 
    echo $incisionLength->id;
    ?>
" data-uri="OphTrOperationnote/admin/incisionLengthDefaultAddForm/<?php 
    echo $incisionLength->id;
    ?>
">
						<td><input type="checkbox" name="incisionLengths[]" value="<?php 
    echo $incisionLength->id;
    ?>
" /></td>
						<td><?php 
    echo $incisionLength->value;
    ?>