Inheritance: extends Action
Esempio n. 1
0
 /**
  * Handle the selection of a booking for creating an op note.
  *
  * (non-phpdoc)
  *
  * @see parent::actionCreate()
  */
 public function actionCreate()
 {
     $errors = array();
     // if we are after the submit we need to check if any event is selected
     if (preg_match('/^biometry([0-9]+)$/', Yii::app()->request->getPost('SelectBiometry'), $m)) {
         $importedEvent = OphInBiometry_Imported_Events::model()->findByPk($m[1]);
         $this->updateImportedEvent(Event::model()->findByPk($importedEvent->event_id), $importedEvent);
         $this->redirect(array('/OphInBiometry/default/view/' . $importedEvent->event_id . '?autosaved=1'));
     }
     $criteria = new CDbCriteria();
     // we are looking for the unlinked imported events in the database
     $criteria->addCondition('patient_id = :patient_id');
     $criteria->addCondition('is_linked = 0');
     $criteria->addCondition('event.deleted = 0');
     $criteria->params = array(':patient_id' => $this->patient->id);
     $unlinkedEvents = OphInBiometry_Imported_Events::model()->with(array('patient', 'event'))->findAll($criteria);
     // if we have 0 unlinked event we follow the manual process
     if (sizeof($unlinkedEvents) == 0 || Yii::app()->request->getQuery('force_manual') == '1') {
         Yii::app()->user->setFlash('issue.formula', $this->flash_message);
         parent::actionCreate();
     } else {
         // if we have more than 1 event we render the selection screen
         $this->title = 'Please Select a Biometry Report';
         $this->event_tabs = array(array('label' => 'The following Biometry reports are available for this patient:', 'active' => true));
         $cancel_url = $this->episode ? '/patient/episode/' . $this->episode->id : '/patient/episodes/' . $this->patient->id;
         $this->event_actions = array(EventAction::link('Cancel', Yii::app()->createUrl($cancel_url), null, array('class' => 'button small warning')));
         $this->render('select_imported_event', array('errors' => $errors, 'imported_events' => $unlinkedEvents));
     }
 }
function processEvents()
{
    global $CONFIG;
    $count = 0;
    while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_va_" . $count])) {
        $event = new Event($_POST[POST_INTERN_PROCESS_EVENTS . "_va_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vb_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vc_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vd_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_ve_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vf_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vg_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vh_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vk_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vl_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vm_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vn_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vo_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vp_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vq_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vs_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vt_" . $count]);
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENTS . "` WHERE `id`='" . DBManager::RealEscape($event->Id) . "' LIMIT 1;");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_ACTIONS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENTS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_ACTIONS . "`.`eid`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_ACTION_OVERLAYS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENT_ACTIONS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_ACTION_OVERLAYS . "`.`action_id`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_ACTION_RECEIVERS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENT_ACTIONS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_ACTION_RECEIVERS . "`.`action_id`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_ACTION_WEBSITE_PUSHS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENT_ACTIONS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_ACTION_WEBSITE_PUSHS . "`.`action_id`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_FUNNELS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENT_URLS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_FUNNELS . "`.`uid`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_FUNNELS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENTS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_FUNNELS . "`.`eid`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_ACTION_SENDERS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENT_ACTION_OVERLAYS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_ACTION_SENDERS . "`.`pid`) AND NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENT_ACTION_WEBSITE_PUSHS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_ACTION_SENDERS . "`.`pid`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_GOALS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_GOALS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_GOALS . "`.`goal_id`)");
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_URLS . "` WHERE NOT EXISTS (SELECT * FROM `" . DB_PREFIX . DATABASE_EVENTS . "` WHERE `id` = `" . DB_PREFIX . DATABASE_EVENT_URLS . "`.`eid`)");
        if (!isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vx_" . $count])) {
            queryDB(true, $event->GetSQL());
            $counturl = 0;
            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_a_" . $counturl])) {
                $eventURL = new EventURL($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_f_" . $counturl], $event->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_a_" . $counturl], $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_b_" . $counturl], $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_c_" . $counturl], $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_d_" . $counturl]);
                queryDB(true, $eventURL->GetSQL());
                if (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_e_" . $counturl])) {
                    queryDB(true, "INSERT INTO `" . DB_PREFIX . DATABASE_EVENT_FUNNELS . "` (`eid`,`uid`,`ind`) VALUES ('" . DBManager::RealEscape($event->Id) . "','" . DBManager::RealEscape($eventURL->Id) . "','" . DBManager::RealEscape($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_e_" . $counturl]) . "');");
                }
                $counturl++;
            }
            $countgoals = 0;
            queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENT_GOALS . "` WHERE `event_id` = '" . DBManager::RealEscape($event->Id) . "';");
            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vs_" . $count . "_a_" . $countgoals])) {
                queryDB(true, "INSERT INTO `" . DB_PREFIX . DATABASE_EVENT_GOALS . "` (`event_id`,`goal_id`) VALUES ('" . DBManager::RealEscape($event->Id) . "','" . DBManager::RealEscape($_POST[POST_INTERN_PROCESS_EVENTS . "_vs_" . $count . "_a_" . $countgoals]) . "');");
                $countgoals++;
            }
            $countaction = 0;
            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_a_" . $countaction])) {
                $eventAction = new EventAction($event->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_a_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_b_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_c_" . $countaction]);
                queryDB(true, $eventAction->GetSQL());
                if ($eventAction->Type == 2 && isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_a_" . $countaction])) {
                    $invitationSettings = @unserialize(base64_decode($CONFIG["gl_invi"]));
                    array_walk($invitationSettings, "b64dcode");
                    //$invitationHTML = applyReplacements($BROWSER->ChatRequest->CreateInvitationTemplate($invitationSettings[13],$CONFIG["gl_site_name"],$CONFIG["wcl_window_width"],$CONFIG["wcl_window_height"],LIVEZILLA_URL,$INTERNAL[$BROWSER->ChatRequest->SenderSystemId],$invitationSettings[0]));
                    //$BROWSER->ChatRequest->Invitation = new Invitation($invitationHTML,$BROWSER->ChatRequest->Text,$invitationSettings);
                    $eventActionInvitation = new Invitation($eventAction->Id, $invitationSettings);
                    queryDB(true, $eventActionInvitation->GetSQL());
                    $countsender = 0;
                    while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_a_" . $countaction . "_" . $countsender])) {
                        $eventActionInvitationSender = new EventActionSender($eventActionInvitation->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_a_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_b_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_c_" . $countaction . "_" . $countsender]);
                        $eventActionInvitationSender->SaveSender();
                        $countsender++;
                    }
                } else {
                    if ($eventAction->Type == 5 && isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_a_" . $countaction])) {
                        $eventActionOverlayBox = new OverlayElement($eventAction->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_a_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_b_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_c_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_d_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_e_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_f_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_g_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_h_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_i_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_j_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_k_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_l_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_m_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_n_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_o_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_p_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_q_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_r_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_ovb_s_" . $countaction]);
                        queryDB(true, $eventActionOverlayBox->GetSQL());
                    } else {
                        if ($eventAction->Type == 4 && isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_a_" . $countaction])) {
                            $eventActionWebsitePush = new WebsitePush($eventAction->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_a_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_b_" . $countaction]);
                            $eventActionWebsitePush->SaveEventConfiguration();
                            $countsender = 0;
                            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_a_" . $countaction . "_" . $countsender])) {
                                $eventActionWebsitePushSender = new EventActionSender($eventActionWebsitePush->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_a_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_b_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_c_" . $countaction . "_" . $countsender]);
                                $eventActionWebsitePushSender->SaveSender();
                                $countsender++;
                            }
                        } else {
                            if ($eventAction->Type < 2) {
                                $countreceiver = 0;
                                while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_d_" . $countaction . "_" . $countreceiver])) {
                                    $eventActionReceiver = new EventActionReceiver($eventAction->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_d_" . $countaction . "_" . $countreceiver], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_e_" . $countaction . "_" . $countreceiver]);
                                    queryDB(true, $eventActionReceiver->GetSQL());
                                    $countreceiver++;
                                }
                            }
                        }
                    }
                }
                $countaction++;
            }
        }
        $count++;
    }
    if ($count > 0) {
        CacheManager::SetDataUpdateTime(DATA_UPDATE_KEY_EVENTS);
    }
}
Esempio n. 3
0
					<label class="inline"><input type="checkbox" name="inline_week1" value="1" /> 1st</label>
					<input type="hidden" name="inline_week2" value="0" />
					<label class="inline"><input type="checkbox" name="inline_week2" value="1" /> 2nd</label>
					<input type="hidden" name="inline_week3" value="0" />
					<label class="inline"><input type="checkbox" name="inline_week3" value="1" /> 3rd</label>
					<input type="hidden" name="inline_week4" value="0" />
					<label class="inline"><input type="checkbox" name="inline_week4" value="1" /> 4th</label>
					<input type="hidden" name="inline_week5" value="0" />
					<label class="inline"><input type="checkbox" name="inline_week5" value="1" /> 5th</label>
				</fieldset>
			</div>
		</div>
		<div class="row field-row">
			<div class="large-10 large-offset-2 column">
				<?php 
echo EventAction::button('Update', 'update_inline', array('colour' => 'green'))->toHtml();
?>
				<img class="loader" src="<?php 
echo Yii::app()->assetManager->createUrl('img/ajax-loader.gif');
?>
" alt="loading..." style="display: none;" />
			</div>
		</div>
	<?php 
$this->endWidget();
?>
</div>

<div id="confirm_delete_sequences" title="Confirm delete sequence" style="display: none;">
	<div id="delete_sequences">
		<div class="alert-box alert with-icon">
 />
					</td>
					<td><?php 
    echo $sessionunavailablereason->name;
    ?>
</td>
				</tr>
			<?php 
}
?>
			</tbody>
			<tfoot>
			<tr>
				<td colspan="2">
					<?php 
echo EventAction::button('Add', 'add', null, array('class' => 'button small', 'data-uri' => '/OphTrOperationbooking/admin/Addsessionunavailablereason'))->toHtml();
?>
				</td>
			</tr>
			</tfoot>
		</table>
	</form>
</div>

<script type="text/javascript">
	$(document).ready(function() {
		$('.sessionunavailablereasons-enabled').on('change', function() {
			var checkbox = $(this);
			var id = $(this).val();
			var action = 'disabled';
			if ($(this).is(':checked')) {
Esempio n. 5
0
 /**
  * Constructor
  * @param $targetSelector string Selector for target to receive event.
  */
 function AddTabAction($targetSelector, $url, $title)
 {
     parent::EventAction($targetSelector, 'addTab', array('url' => $url, 'title' => $title));
 }
Esempio n. 6
0
					<td><?php 
    echo $firm->consultant ? $firm->consultant->fullName : 'None';
    ?>
</td>
					<td><?php 
    echo $firm->active ? 'Active' : 'Inactive';
    ?>
</td>
				</tr>
			<?php 
}
?>
			</tbody>
			<tfoot class="pagination-container">
			<tr>
				<td colspan="6">
					<?php 
echo EventAction::button('Add', 'add', array(), array('class' => 'small'))->toHtml();
?>
					<?php 
echo EventAction::button('Delete', 'delete', array(), array('class' => 'small'))->toHtml();
?>
					<?php 
echo $this->renderPartial('_pagination', array('pagination' => $pagination));
?>
				</td>
			</tr>
			</tfoot>
		</table>
	</form>
</div>
Esempio n. 7
0
 * 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-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<?php 
$this->beginContent('//patient/event_container');
?>
	<?php 
$this->event_actions[] = EventAction::button('Save', 'save', array('level' => 'save'), array('form' => 'clinical-create'));
$this->title .= ' (' . $this->getNextStep()->name . ')';
?>
	<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'clinical-create', 'enableAjaxValidation' => false, 'layoutColumns' => array('label' => 4, 'field' => 8)));
?>
		<?php 
$this->displayErrors($errors);
?>
		<?php 
$this->renderPartial('//patient/event_elements', array('form' => $form));
?>
		<?php 
$this->displayErrors($errors, true);
?>
					<td>
						<a href="/admin/editAnaestheticAgent/<?php 
    echo $anaestheticAgent->id;
    ?>
">Edit</a>
						&nbsp;|&nbsp;
						<a href="/admin/deleteAnaestheticAgent/<?php 
    echo $anaestheticAgent->id;
    ?>
">Delete</a>
					</td>
				</tr>
			<?php 
}
?>
			</tbody>
			<tfoot class="pagination-container">
			<tr>
				<td colspan="3">
					<?php 
echo EventAction::button('Add', 'add', null, array('class' => 'small', 'data-uri' => '/OphTrOperationnote/admin/addPostOpDrug'))->toHtml();
?>
					<?php 
echo EventAction::button('Delete', 'delete', null, array('class' => 'small', 'data-uri' => '/OphTrOperationnote/admin/deletePostOpDrugs', 'data-object' => 'drug'))->toHtml();
?>
				</td>
			</tr>
			</tfoot>
		</table>
	</form>
</div>
function appendEvents()
{
    global $VISITOR;
    $count = 0;
    while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_va_" . $count])) {
        $event = new Event($_POST[POST_INTERN_PROCESS_EVENTS . "_va_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vb_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vc_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vd_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_ve_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vf_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vg_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vh_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vk_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vl_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vm_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vn_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vo_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vp_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vq_" . $count], $_POST[POST_INTERN_PROCESS_EVENTS . "_vs_" . $count]);
        queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_EVENTS . "` WHERE `id`='" . @mysql_real_escape_string($event->Id) . "' LIMIT 1;");
        if (!isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vx_" . $count])) {
            queryDB(true, $event->GetSQL());
            $counturl = 0;
            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_a_" . $counturl])) {
                $eventURL = new EventURL($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_f_" . $counturl], $event->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_a_" . $counturl], $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_b_" . $counturl], $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_c_" . $counturl], $_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_d_" . $counturl]);
                queryDB(true, $eventURL->GetSQL());
                if (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_e_" . $counturl])) {
                    queryDB(true, "INSERT INTO `" . DB_PREFIX . DATABASE_EVENT_FUNNELS . "` (`eid`,`uid`,`ind`) VALUES ('" . @mysql_real_escape_string($event->Id) . "','" . @mysql_real_escape_string($eventURL->Id) . "','" . @mysql_real_escape_string($_POST[POST_INTERN_PROCESS_EVENTS . "_vi_" . $count . "_e_" . $counturl]) . "');");
                }
                $counturl++;
            }
            $countgoals = 0;
            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vs_" . $count . "_a_" . $countgoals])) {
                queryDB(true, "INSERT INTO `" . DB_PREFIX . DATABASE_EVENT_GOALS . "` (`event_id`,`goal_id`) VALUES ('" . @mysql_real_escape_string($event->Id) . "','" . @mysql_real_escape_string($_POST[POST_INTERN_PROCESS_EVENTS . "_vs_" . $count . "_a_" . $countgoals]) . "');");
                $countgoals++;
            }
            $countaction = 0;
            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_a_" . $countaction])) {
                $eventAction = new EventAction($event->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_a_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_b_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_c_" . $countaction]);
                queryDB(true, $eventAction->GetSQL());
                if ($eventAction->Type == 2 && isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_a_" . $countaction])) {
                    $eventActionInvitation = new Invitation($eventAction->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_a_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_b_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_c_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_d_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_e_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_f_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_g_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_h_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_" . $countaction]);
                    queryDB(true, $eventActionInvitation->GetSQL());
                    $countsender = 0;
                    while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_a_" . $countaction . "_" . $countsender])) {
                        $eventActionInvitationSender = new EventActionSender($eventActionInvitation->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_a_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_b_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_inv_i_c_" . $countaction . "_" . $countsender]);
                        $eventActionInvitationSender->SaveSender();
                        $countsender++;
                    }
                } else {
                    if ($eventAction->Type == 4 && isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_a_" . $countaction])) {
                        $eventActionWebsitePush = new WebsitePush($eventAction->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_a_" . $countaction], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_b_" . $countaction]);
                        $eventActionWebsitePush->SaveEventConfiguration();
                        $countsender = 0;
                        while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_a_" . $countaction . "_" . $countsender])) {
                            $eventActionWebsitePushSender = new EventActionSender($eventActionWebsitePush->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_a_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_b_" . $countaction . "_" . $countsender], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_wp_c_c_" . $countaction . "_" . $countsender]);
                            $eventActionWebsitePushSender->SaveSender();
                            $countsender++;
                        }
                    } else {
                        if ($eventAction->Type < 2) {
                            $countreceiver = 0;
                            while (isset($_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_d_" . $countaction . "_" . $countreceiver])) {
                                $eventActionReceiver = new EventActionReceiver($eventAction->Id, $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_d_" . $countaction . "_" . $countreceiver], $_POST[POST_INTERN_PROCESS_EVENTS . "_vj_" . $count . "_e_" . $countaction . "_" . $countreceiver]);
                                queryDB(true, $eventActionReceiver->GetSQL());
                                $countreceiver++;
                            }
                        }
                    }
                }
                $countaction++;
            }
        }
        $count++;
    }
}
Esempio n. 10
0
    ?>
" /></td>
						<td><?php 
    echo $incisionLength->value;
    ?>
</td>
						<td><?php 
    echo $incisionLength->firm->getNameAndSubspecialty();
    ?>
</td>
					</tr>
				<?php 
}
?>
			</tbody>
			<tfoot class="pagination-container">
				<tr>
					<td colspan="3">
						<?php 
echo EventAction::button('Add', 'add', null, array('class' => 'small', 'data-uri' => '/OphTrOperationnote/admin/incisionLengthDefaultAddForm'))->toHtml();
?>
						<?php 
echo EventAction::button('Delete', 'delete', null, array('class' => 'small', 'data-uri' => '/OphTrOperationnote/admin/deleteIncisionLengthDefaults', 'data-object' => 'incisionLength'))->toHtml();
?>
					</td>
				</tr>
			</tfoot>
		</table>
	</form>
</div>
Esempio n. 11
0
<?php

/**
 * OpenEyes.
 *
 * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2013
 * (C) OpenEyes Foundation, 2011-2013
 * 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-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
$this->beginContent('//patient/event_container', array());
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'update-form', 'enableAjaxValidation' => false, 'layoutColumns' => array('label' => 2, 'field' => 10)));
$this->event_actions[] = EventAction::button('Save', 'save', array('level' => 'save'), array('form' => 'update-form'));
$this->displayErrors($errors);
$this->renderPartial('//patient/event_elements', array('form' => $form, 'disableOptionalElementActions' => true));
$this->displayErrors($errors, true);
$this->endWidget();
$this->endContent();
Esempio n. 12
0
 *
 * @author OpenEyes <*****@*****.**>
 * @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
 */
$this->beginContent('//patient/event_container');
?>

<?php 
// Event actions
if ($this->checkPrintAccess()) {
    $this->event_actions[] = EventAction::button('Print', 'print', null, array('class' => 'button small'));
}
if ($this->editable && ($next_step = $this->getNextStep())) {
    $this->event_actions[] = EventAction::link($next_step->name, Yii::app()->createUrl($this->event->eventType->class_name . '/default/step/' . $this->event->id), null, array('class' => 'button small'));
}
?>

<?php 
if ($this->event->delete_pending) {
    ?>
	<div class="alert-box alert with-icon">
		This event is pending deletion and has been locked.
	</div>
<?php 
}
?>

<?php 
$this->renderOpenElements($this->action->id);
Esempio n. 13
0
    echo $cb->address ? $cb->address->address1 : 'None';
    ?>
</td>
					</tr>
				<?php 
}
?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="5">
						<?php 
echo EventAction::button('Add', 'add_commissioning_body', array(), array('class' => 'small'))->toHtml();
?>
						<?php 
echo EventAction::button('Delete', 'delete_commissioning_body', array(), array('class' => 'small'))->toHtml();
?>
					</td>
				</tr>
			</tfoot>
		</table>
	</form>
</div>
<div id="confirm_delete_commissioning_bodies" title="Confirm delete commissioning_body" style="display: none;">
	<div>
		<div id="delete_commissioning_bodies">
			<div class="alertBox" style="margin-top: 10px; margin-bottom: 15px;">
				<strong>WARNING: This will remove the commissioning bodies from the system.<br/>This action cannot be undone.</strong>
			</div>
			<p>
				<strong>Are you sure you want to proceed?</strong>
Esempio n. 14
0
    echo $site->remote_id;
    ?>
</td>
						<td><?php 
    echo $site->name;
    ?>
</td>
						<td><?php 
    echo $site->getLetterAddress(array('delimiter' => ', '));
    ?>
</td>
					</tr>
				<?php 
}
?>
			</tbody>
			<tfoot class="pagination-container">
				<tr>
					<td colspan="4">
						<?php 
echo EventAction::button('Add', 'add', array(), array('class' => 'small'))->toHtml();
?>
						<?php 
echo $this->renderPartial('_pagination', array('pagination' => $pagination));
?>
					</td>
				</tr>
			</tfoot>
		</table>
	</form>
</div>
Esempio n. 15
0
 *
 * (C) OpenEyes Foundation, 2016
 * 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) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Worklist Patients: <?php 
echo $worklist->name;
?>
 (<?php 
echo $worklist->worklist_definition->name;
?>
)</h2>
<?php 
echo EventAction::link('All Instances', '/worklistAdmin/definitionWorklists/' . $worklist->worklist_definition_id, array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
&nbsp;<?php 
echo EventAction::link('Definition Mappings', '/worklistAdmin/definitionMappings/' . $worklist->worklist_definition_id, array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
echo $this->manager->renderWorklistForDashboard($worklist);
?>
</div>
    echo $step->position;
    ?>
</td>
						<td><?php 
    echo $step->name;
    ?>
</td>
						<td><a href="#" class="removeElementSet" rel="<?php 
    echo $step->id;
    ?>
">Remove</a></td>
					</tr>
				<?php 
}
?>
			</tbody>
			<tfoot class="pagination-container">
				<tr>
					<td colspan="3">
						<?php 
echo EventAction::button('Add step', 'add_step', null, array('class' => 'small'))->toHtml();
?>
					</td>
				</tr>
			</tfoot>
		</table>
	</form>
</div>
<div class="box_admin" id="step_element_types">
</div>
Esempio n. 17
0
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <*****@*****.**>
 * @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
 */
$this->beginContent('//patient/event_container');
?>

	<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'correspondence-create', 'enableAjaxValidation' => false, 'layoutColumns' => array('label' => 2, 'field' => 10)));
// Event actions
$this->event_actions[] = EventAction::button('Save draft', 'savedraft', array('level' => 'secondary'), array('id' => 'et_save_draft', 'class' => 'button small', 'form' => 'correspondence-create'));
$this->event_actions[] = EventAction::button('Save and print', 'saveprint', array('level' => 'secondary'), array('id' => 'et_save_print', 'class' => 'button small', 'form' => 'correspondence-create'));
?>

		<?php 
if (!$this->patient->practice || !$this->patient->practice->contact->address) {
    ?>
			<div id="no-practice-address" class="alert-box alert with-icon">
				Patient has no GP practice address, please correct in PAS before creating GP letter.
			</div>
		<?php 
}
?>

		<?php 
$this->displayErrors($errors);
?>
Esempio n. 18
0
/**
 * OpenEyes.
 *
 * (C) OpenEyes Foundation, 2016
 * 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) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Generated Instances for <?php 
echo $definition->name;
?>
</h2>
    <?php 
echo EventAction::link('Definitions List', '/worklistAdmin/definitions/', array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
    <?php 
$this->renderPartial('//admin/worklists/definition_worklists_table', array('definition' => $definition));
?>
</div>
Esempio n. 19
0
* 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-2013, OpenEyes Foundation
* @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
*/
$this->beginContent('//patient/event_container');
?>

	<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'clinical-create', 'enableAjaxValidation' => false));
// Event actions
$this->event_actions[] = EventAction::button('Save', '#', null, array('name' => 'scheduleLater', 'id' => 'et_save', 'class' => 'button small', 'form' => 'clinical-create', 'style' => $this->checkScheduleAccess() ? 'display: none;' : ''));
$this->event_actions[] = EventAction::button('Save and Schedule later', '#', null, array('name' => 'scheduleLater', 'id' => 'et_save_and_schedule_later', 'class' => 'button small', 'form' => 'clinical-create', 'style' => $this->checkScheduleAccess() ? '' : 'display: none;'));
$this->event_actions[] = EventAction::button('Save and Schedule now', '#', array('level' => 'secondary'), array('name' => 'scheduleNow', 'id' => 'et_save_and_schedule', 'class' => 'button small', 'form' => 'clinical-create', 'style' => $this->checkScheduleAccess() ? '' : 'display: none;'));
?>
	<input type="hidden" name="schedule_now" id="schedule_now" value="0" />
	<?php 
$this->displayErrors($errors);
$this->renderOpenElements($this->action->id, $form);
$this->renderOptionalElements($this->action->id, $form);
$this->displayErrors($errors, true);
$this->endWidget();
?>

<?php 
$this->endContent();
						<td>
							<?php 
    echo $model->name;
    ?>
						</td>
						<td>
							<?php 
    echo $model->active ? 'Yes' : 'No';
    ?>
						</td>
					</tr>
				<?php 
}
?>
			</tbody>
			<tfoot class="pagination-container">
				<tr>
					<td colspan="2">
						<?php 
echo EventAction::button('Add', 'add', null, array('class' => 'small', 'data-uri' => '/OphTrIntravitrealinjection/admin/addTreatmentDrug'))->toHtml();
?>
						<?php 
echo EventAction::button('Delete', 'delete', null, array('class' => 'small', 'data-uri' => '/OphTrIntravitrealinjection/admin/deleteTreatmentDrugs', 'data-object' => 'treatment_drugs'))->toHtml();
?>
					</td>
				</tr>
			</tfoot>
		</table>
	</form>
</div>
 /**
  * The update action for the given event id
  *
  * @param $id
  * @throws CHttpException
  * @throws SystemException
  * @throws Exception
  */
 public function actionUpdate($id)
 {
     if (!empty($_POST)) {
         // somethings been submitted
         if (isset($_POST['cancel'])) {
             // Cancel button pressed, so just bounce to view
             $this->redirect(array('default/view/' . $this->event->id));
         }
         $errors = $this->setAndValidateElementsFromData($_POST);
         // update the event
         if (empty($errors)) {
             $transaction = Yii::app()->db->beginTransaction();
             try {
                 //TODO: should all the auditing be moved into the saving of the event
                 $success = $this->saveEvent($_POST);
                 if ($success) {
                     //TODO: should not be pasing event?
                     $this->afterUpdateElements($this->event);
                     $this->logActivity('updated event');
                     $this->event->audit('event', 'update');
                     $this->event->user = Yii::app()->user->id;
                     if (!$this->event->save()) {
                         throw new SystemException('Unable to update event: ' . print_r($this->event->getErrors(), true));
                     }
                     OELog::log("Updated event {$this->event->id}");
                     $transaction->commit();
                     $this->redirect(array('default/view/' . $this->event->id));
                 } else {
                     throw new Exception("Unable to save edits to event");
                 }
             } catch (Exception $e) {
                 $transaction->rollback();
                 throw $e;
             }
         }
     } else {
         // get the elements
         $this->setOpenElementsFromCurrentEvent('update');
     }
     $this->editing = true;
     $this->event_tabs = array(array('label' => 'View', 'href' => Yii::app()->createUrl($this->event->eventType->class_name . '/default/view/' . $this->event->id)), array('label' => 'Edit', 'active' => true));
     $this->event_actions = array(EventAction::link('Cancel', Yii::app()->createUrl($this->event->eventType->class_name . '/default/view/' . $this->event->id), array('level' => 'cancel')));
     $this->render($this->action->id, array('errors' => @$errors));
 }
Esempio n. 22
0
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <*****@*****.**>
 * @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
 */
?>

<?php 
$this->beginContent('//patient/event_container');
?>
	<?php 
$this->breadcrumbs = array($this->module->id);
$this->event_actions[] = EventAction::button('Save', 'save', array('level' => 'save'), array('form' => 'anaesthetic-update'));
?>

	<?php 
$this->renderPartial('//base/_messages');
?>

	<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'anaesthetic-update', 'enableAjaxValidation' => false, 'layoutColumns' => array('label' => 2, 'field' => 10)));
?>
		<?php 
$this->displayErrors($errors);
?>
		<?php 
$this->renderOpenElements($this->action->id, $form);
?>
Esempio n. 23
0
 * 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-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
$this->beginContent('//patient/event_container');
?>

	<?php 
// Event actions
if ($this->checkPrintAccess()) {
    $this->event_actions[] = EventAction::button('Print', 'print', null, array('id' => 'et_print', 'class' => 'button small'));
}
?>

	<?php 
$this->renderPartial('//base/_messages');
?>

	<?php 
if ($this->event->delete_pending) {
    ?>
		<div class="alert-box alert with-icon">
			This event is pending deletion and has been locked.
		</div>
	<?php 
} elseif (Element_OphDrPrescription_Details::model()->find('event_id=?', array($this->event->id))->draft) {
Esempio n. 24
0
                         Edit | Delete
                         </span>
                     <?php 
         }
         ?>
                 </td>
             </tr>
         <?php 
     }
     ?>
         </tbody>
         <tfoot>
         <tr>
             <td colspan="4">
                 <?php 
     echo EventAction::button('Sort', 'sort', array(), array('class' => 'small', 'style' => 'display:none;', 'data-uri' => '/worklistAdmin/definitionMappingSort/' . $definition->id, 'data-object' => 'WorklistDefinitionMapping'))->toHtml();
     ?>
             </td>
         </tr>
         </tfoot>
     </table>
     <?php 
 }
 if ($definition->hidden_mappings) {
     ?>
         <h2>Hidden Mapping Items</h2>
         <table class="generic-admin grid">
             <thead>
             <tr>
                 <th>Order</th>
                 <th>Name</th>
Esempio n. 25
0
    echo $theatre->ward ? $theatre->ward->name : 'None';
    ?>
</td>
				</tr>
			<?php 
}
?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="5">
						<?php 
echo EventAction::button('Add', 'add_theatre', null, array('class' => 'button small'))->toHtml();
?>
						<?php 
echo EventAction::button('Delete', 'delete_theatre', null, array('class' => 'button small'))->toHtml();
?>
					</td>
				</tr>
			</tfoot>
		</table>
	</form>
</div>

<div id="confirm_delete_theatres" title="Confirm delete theatre" style="display: none;">
	<div id="delete_theatres">
		<div class="alert-box alert with-icon">
			<strong>WARNING: This will remove the theatres from the system.<br/>This action cannot be undone.</strong>
		</div>
		<p>
			<strong>Are you sure you want to proceed?</strong>
Esempio n. 26
0
<?php

$this->beginContent('//patient/event_container');
?>

<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'lab-results-create', 'enableAjaxValidation' => false));
// Event actions
$this->event_actions[] = EventAction::button('Save', 'save', array('level' => 'save'), array('form' => 'lab-results-create'));
$this->displayErrors($errors);
?>

<?php 
$this->renderOpenElements($this->action->id, $form);
?>

<?php 
$this->displayErrors($errors, true);
$this->endWidget();
?>

    <div id="dialog-confirm-cancel" title="Cancel" class="hide">
        <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>All text entered will be lost. Are you sure?</p>
    </div>

<?php 
$this->endContent();
Esempio n. 27
0
			</div>
		</div>
		<div class="row field-row">
			<div class="large-2 column">
				<label for="label">Label:</label>
			</div>
			<div class="large-4 column end">
				<?php 
echo CHtml::dropDownList('label', @$_GET['label'], CHtml::listData(ContactLabel::model()->active()->findAll(array('order' => 'name')), 'id', 'name'), array('empty' => '- Any label -'));
?>
			</div>
		</div>
		<div class="row field-row">
			<div class="large-4 large-offset-2 column end">
				<?php 
echo EventAction::button('Search', 'search', array(), array('class' => 'small'))->toHtml();
?>
				<img src="<?php 
echo Yii::app()->assetManager->createUrl('img/ajax-loader.gif');
?>
" class="loader" alt="loading..." style="display: none;" />
			</div>
		</div>
	</form>
</div>
<?php 
if (@$contacts) {
    ?>
		<?php 
    echo $this->renderPartial('/admin/_contacts_list', array('contacts' => $contacts));
}
Esempio n. 28
0
 * (C) OpenEyes Foundation, 2011-2013
 * 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-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
// Event actions
$this->event_actions[] = EventAction::link('Cancel', Yii::app()->createUrl('/patient/episode/' . $episode->id), array('level' => 'cancel'));
$this->event_actions[] = EventAction::button('Save', 'save', array('id' => 'episode_save', 'level' => 'save'));
if ($episode->diagnosis) {
    $eye = $episode->eye ? $episode->eye->name : 'None';
    $diagnosis = $episode->diagnosis ? $episode->diagnosis->term : 'none';
} else {
    $eye = 'No diagnosis';
    $diagnosis = 'No diagnosis';
}
$episode->audit('episode summary', 'view');
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'update-episode', 'enableAjaxValidation' => false, 'action' => array('patient/updateepisode/' . $episode->id)));
?>

	<div class="element-data">
		<h2>Summary</h2>
		<h3><?php 
echo $episode->firm->serviceSubspecialtyAssignment->subspecialty->name;
            if (!$element->has_gp || !$element->has_address) {
                $print_letter_options['disabled'] = true;
            }
            $this->event_actions[] = EventAction::button('Print ' . $element->letterType . ' letter', 'print-letter', $print_letter_options, array('id' => 'btn_print-letter', 'class' => 'button small'));
            if ($element->letterType === 'Invitation') {
                $this->event_actions[] = EventAction::button('Print Admission form', 'print_admission_form', null, array('class' => 'small button'));
            }
        }
        if ($this->checkScheduleAccess()) {
            $this->event_actions[] = EventAction::link('Schedule now', Yii::app()->createUrl('/' . $element->event->eventType->class_name . '/booking/schedule/' . $element->event_id), array('level' => 'secondary'), array('id' => 'btn_schedule-now', 'class' => 'button small'));
        }
    } else {
        if ($this->checkPrintAccess()) {
            $print_letter_options = null;
            if (!$element->has_address) {
                $print_letter_options['disabled'] = true;
            }
            $this->event_actions[] = EventAction::button('Print letter', 'print-letter', $print_letter_options, array('id' => 'btn_print-admissionletter', 'class' => 'small button'));
            $this->event_actions[] = EventAction::button('Print admission form', 'print_admission_form', null, array('class' => 'small button'));
        }
        if ($this->checkScheduleAccess()) {
            $this->event_actions[] = EventAction::link('Reschedule now', Yii::app()->createUrl('/' . $element->event->eventType->class_name . '/booking/reschedule/' . $element->event_id), array('level' => 'secondary'), array('id' => 'btn_reschedule-now', 'class' => 'button small'));
        }
        if ($this->checkEditAccess()) {
            $this->event_actions[] = EventAction::link('Reschedule later', Yii::app()->createUrl('/' . $element->event->eventType->class_name . '/booking/rescheduleLater/' . $element->event_id), array('level' => 'secondary'), array('id' => 'btn_reschedule-later', 'class' => 'button small'));
        }
    }
    if ($this->checkEditAccess()) {
        $this->event_actions[] = EventAction::link('Cancel operation', Yii::app()->createUrl('/' . $element->event->eventType->class_name . '/default/cancel/' . $element->event_id), array(), array('id' => 'btn_cancel-operation', 'class' => 'warning button small'));
    }
}
Esempio n. 30
0
	<div class="large-<?php 
echo 12 - $layoutColumns['label'];
?>
 large-offset-<?php 
echo $layoutColumns['label'];
?>
 column">
		<?php 
echo EventAction::button($buttonOptions['submit'], 'save', array(), array('class' => 'button small'))->toHtml();
?>
		<?php 
if ($buttonOptions['cancel']) {
    $cancelHtmlOptions = array('class' => 'warning button small');
    if (@$buttonOptions['cancel-uri']) {
        $cancelHtmlOptions['data-uri'] = $buttonOptions['cancel-uri'];
    }
    echo EventAction::button($buttonOptions['cancel'], 'cancel', array(), $cancelHtmlOptions)->toHtml();
}
?>
		<?php 
if ($buttonOptions['delete']) {
    echo EventAction::button($buttonOptions['delete'], 'delete', array(), array('class' => 'warning button small'))->toHtml();
}
?>
		<img class="loader" src="<?php 
echo Yii::app()->assetManager->createUrl('img/ajax-loader.gif');
?>
" alt="loading..." style="display: none;" />
	</div>
</div>