mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX createTag() on FormField subclasses should use getTabIndex() instead of getTabIndexHTML() as createTag() is responsible for generating the HTML, and all we need is the tabindex value
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62490 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5524225ead
commit
955d500a95
@ -18,13 +18,14 @@ class AjaxFormAction extends FormAction {
|
||||
$this->ajaxAction = $ajaxAction ? $ajaxAction : $action;
|
||||
parent::__construct($action, $title, $form);
|
||||
}
|
||||
|
||||
function Field() {
|
||||
return $this->createTag('input', array(
|
||||
'class' => "ajaxAction-$this->ajaxAction action",
|
||||
'id' => $this->id(),
|
||||
'type' => 'submit',
|
||||
'value' => $this->title,
|
||||
'tabindex' => $this->getTabIndexHTML()
|
||||
'tabindex' => $this->getTabIndex()
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class AjaxUniqueTextField extends TextField {
|
||||
'id' => $this->id(),
|
||||
'name' => $this->Name(),
|
||||
'value' => $this->Value(),
|
||||
'tabindex' => $this->getTabIndexHTML(),
|
||||
'tabindex' => $this->getTabIndex(),
|
||||
'maxlength' => ($this->maxLength) ? $this->maxLength : null
|
||||
);
|
||||
|
||||
|
@ -26,7 +26,7 @@ class AutocompleteTextField extends TextField {
|
||||
'id' => $this->id(),
|
||||
'name' => $this->name,
|
||||
'value' => $this->Value(),
|
||||
'tabindex' => $this->getTabIndexHTML(),
|
||||
'tabindex' => $this->getTabIndex(),
|
||||
'size' => $this->maxLength ? min( $this->maxLength, 30 ) : 30
|
||||
);
|
||||
if($this->maxLength) $attributes['maxlength'] = $this->maxLength;
|
||||
|
@ -17,7 +17,7 @@ class CheckboxFieldDisabled extends CheckboxField {
|
||||
'class' => $this->extraClass() . " text",
|
||||
'id' => $this->id(),
|
||||
'name' => $this->Name(),
|
||||
'tabindex' => $this->getTabIndexHTML(),
|
||||
'tabindex' => $this->getTabIndex(),
|
||||
'checked' => ($this->value) ? 'checked' : false,
|
||||
'disabled' => 'disabled'
|
||||
);
|
||||
|
@ -19,6 +19,7 @@ class ConfirmedFormAction extends FormAction {
|
||||
$this->confirmation = $confirmation;
|
||||
parent::__construct($action, $title, $form);
|
||||
}
|
||||
|
||||
function Field() {
|
||||
$attributes = array(
|
||||
'type' => 'submit',
|
||||
@ -26,7 +27,7 @@ class ConfirmedFormAction extends FormAction {
|
||||
'id' => $this->id(),
|
||||
'name' => $this->Name(),
|
||||
'value' => $this->attrTitle(),
|
||||
'tabindex' => $this->getTabIndexHTML(),
|
||||
'tabindex' => $this->getTabIndex(),
|
||||
'onclick' => "return confirm('$this->confirmation');"
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user