Orion PHP  0.11.12
The PHP5.3 framework
cancel.php
Go to the documentation of this file.
00001 <?php
00002 namespace Orion\Core\Form;
00003 
00004 class Cancel extends Field
00005 {
00006     public function __construct($bind='cancel', $label='Cancel')
00007     {
00008         $this->type = 'cancel';
00009         $this->bind = $bind;
00010         $this->label = $label;
00011     }
00012 
00013     public function toHtml($XHTML=true)
00014     {
00015         if($XHTML)
00016             $tag = ' /';
00017         else
00018             $tag = '';
00019 
00020         return '<div class="form-row"><input name="'.$this->bind.'" type="button" onclick="javascript:history.go(-1);" class="form-button form-cancel" value="'.$this->label.'"'.$tag.'></div>';
00021     }
00022 }
00023 
00024 ?>