EventAction::button PHP Method

button() public static method

public static button ( $label, $name, $options = null, $htmlOptions = null )
    public static function button($label, $name, $options = null, $htmlOptions = null)
    {
        $action = new self($label, 'button', $options, $htmlOptions);
        $action->htmlOptions['name'] = $name;
        if (!isset($action->htmlOptions['type'])) {
            $action->htmlOptions['type'] = 'submit';
        }
        if (!isset($action->htmlOptions['id'])) {
            $action->htmlOptions['id'] = 'et_' . strtolower($name);
        }
        return $action;
    }

Usage Example

 * 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/>.
 *
 * @package OpenEyes
 * @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' => 'examination-create'));
?>

	<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'examination-create', 'enableAjaxValidation' => false, 'layoutColumns' => array('label' => 4, 'field' => 8)));
?>

      <?php 
if (!empty($errors)) {
}
?>
		 <script type='text/javascript'>
            $(document).ready( function(){
                 window.formHasChanged = true;
            });
         </script>
All Usage Examples Of EventAction::button