extraClass = ' '.$extraClass;
parent::__construct($action, $title, null, null);
}
function performReadonlyTransformation() {
return new InlineFormAction_ReadOnly( $this->name, $this->title );
}
function Field() {
if($this->includeDefaultJS) {
Requirements::javascriptTemplate('sapphire/javascript/InlineFormAction.js',array('ID'=>$this->id()));
}
return "name}\" value=\"{$this->title}\" id=\"{$this->id()}\" class=\"action{$this->extraClass}\" />";
}
function Title() {
return false;
}
/**
* Optionally disable the default javascript include (sapphire/javascript/InlineFormAction.js),
* which routes to an "admin-custom"-URL.
*
* @param $bool boolean
*/
function includeDefaultJS($bool) {
$this->includeDefaultJS = (bool)$bool;
}
}
/**
* Readonly version of {@link InlineFormAction}.
* @package forms
* @subpackage actions
*/
class InlineFormAction_ReadOnly extends FormField {
protected $readonly = true;
function Field() {
return "name}\" value=\"{$this->title}\" id=\"{$this->id()}\" disabled=\"disabled\" class=\"action$extraClass\" />";
}
function Title() {
return false;
}
}
?>