BUGFIX: FormAction input tag attributes were being doubly-escaped. (from r100407)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105561 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 03:50:37 +00:00
parent ffa1267516
commit 00d19cc3d1

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);
} }