BUGFIX: FormAction input tag attributes were being doubly-escaped.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100407 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Luke Hudson 2010-03-03 04:48:15 +00:00 committed by Sam Minnee
parent 51de5dc914
commit d9dcc4e822

View File

@ -86,21 +86,21 @@ class FormAction extends FormField {
$attributes['class'] = $attributes['class'] . ' disabled'; $attributes['class'] = $attributes['class'] . ' disabled';
} }
return $this->createTag('button', $attributes, $this->buttonContent ? $this->buttonContent : $this->attrTitle()); return $this->createTag('button', $attributes, $this->buttonContent ? $this->buttonContent : $this->Title());
} else { } else {
$attributes = array( $attributes = array(
'class' => 'action' . ($this->extraClass() ? $this->extraClass() : ''), 'class' => 'action' . ($this->extraClass() ? $this->extraClass() : ''),
'id' => $this->id(), 'id' => $this->id(),
'type' => 'submit', 'type' => 'submit',
'name' => $this->action, 'name' => $this->action,
'value' => ($this->dontEscape) ? $this->Title() : $this->attrTitle(), 'value' => $this->Title(),
'tabindex' => $this->getTabIndex() 'tabindex' => $this->getTabIndex()
); );
if($this->isReadonly()) { if($this->isReadonly()) {
$attributes['disabled'] = 'disabled'; $attributes['disabled'] = 'disabled';
$attributes['class'] = $attributes['class'] . ' disabled'; $attributes['class'] = $attributes['class'] . ' disabled';
} }
$attributes['title'] = ($this->description) ? $this->description : ($this->dontEscape) ? $this->Title() : $this->attrTitle(); $attributes['title'] = ($this->description) ? $this->description : $this->Title();
return $this->createTag('input', $attributes); return $this->createTag('input', $attributes);
} }