FEATURE: respect $extraClass

BUGFIX: overloaded FieldHolder() to avoid DefaultFieldHolder.ss usage

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43559 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-10-18 01:06:21 +00:00
parent 53f75e957d
commit eeb79fde9c
2 changed files with 8 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class ConfirmedFormAction extends FormAction {
parent::__construct($action, $title, $form);
}
function Field() {
return "<input class=\"action\" id=\"" . $this->id() . "\" type=\"submit\" name=\"{$this->name}\" value=\"{$this->title}\" onclick=\"return confirm('$this->confirmation')\" />";
return "<input class=\"action " . $this->extraClass() . "\" id=\"" . $this->id() . "\" type=\"submit\" name=\"{$this->name}\" value=\"{$this->title}\" onclick=\"return confirm('$this->confirmation');\" />";
}
}

View File

@ -32,6 +32,13 @@ class FormAction extends FormField {
return $this->extraData;
}
/**
* Avoid rendering with DefaultFieldHolder (renders <label>-tags etc.)
*/
function FieldHolder() {
return $this->Field();
}
function Field() {
$titleAttr = $this->description ? "title=\"" . Convert::raw2att($this->description) . "\"" : '';
return "<input class=\"action" . $this->extraClass() . "\" id=\"" . $this->id() . "\" type=\"submit\" name=\"{$this->name}\" value=\"" . $this->attrTitle() . "\" $titleAttr />";