(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
(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 .
public function run() { if (empty($_POST)) { if ($this->element->{$this->field}) { if (preg_match('/^[0-9]+ [a-zA-Z]+ [0-9]+$/', $this->element->{$this->field})) { $this->value = $this->element->{$this->field}; } else { $this->value = date('j M Y', strtotime($this->element->{$this->field})); } } else { if (@$this->htmlOptions['null']) { $this->value = null; } else { $this->value = date('j M Y'); } } } else { if ($this->name) { $this->value = $this->getPOSTValue($this->name); } else { $this->value = $_POST[get_class($this->element)][$this->field]; } } parent::run(); }
public function init() { parent::init(); if (is_string($this->data)) { $this->data = SelectionHelper::listData($this->data, $this->element->{$this->field}); } }
public function init() { parent::init(); $this->max = count($this->data) + 1; if (!$this->value) { $this->value = 1; } }
public function init() { parent::init(); if (array_key_exists('password', $this->htmlOptions)) { $this->htmlOptions['type'] = 'password'; } elseif (!array_key_exists('type', $this->htmlOptions)) { $this->htmlOptions['type'] = 'text'; } }
public function init() { parent::init(); if (is_string($this->data)) { $class = $this->data; $lookup = $class::model(); if ($lookup->asa('LookupTable')) { $lookup->activeOrPk($this->element->{$this->field}); } $this->data = CHtml::listData($lookup->cache(60)->findAll(), $this->lookup_id_field, $this->lookup_name_field); } }
public function init() { parent::init(); if ($this->null) { $this->max += 1; if ($this->value === null) { $this->value = 0; $this->value_display = 'NR'; } else { $this->value_display = $this->value++; } } else { $this->value_display = $this->value; } if ($this->width && !preg_match('/[^0-9]/', $this->width)) { $this->width .= 'px'; } }
public function render($view, $data = null, $return = false) { if ($this->layout) { $view .= '_' . $this->layout; } if ($this->restrict == 'systemic') { $this->code = $this->restrict; } parent::render($view, $data, $return); }
public function render($view, $data = null, $return = false) { if ($this->layout) { $view .= '_' . $this->layout; } parent::render($view, $data, $return); }
public function init() { $this->buttonOptions = array_merge($this->defaultButtonOptions, $this->buttonOptions); return parent::init(); }