diff --git a/css/GridField.css b/css/GridField.css index 3cd59c8bb..eaa877d05 100644 --- a/css/GridField.css +++ b/css/GridField.css @@ -65,10 +65,10 @@ .cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { background-position: right -34px; } .cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-desc { background-position: right -72px; } .cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-asc { background-position: right -116px; } -.cms table.ss-gridfield-table tr th button.ss-gridfield-button-filter.ss-ui-button { position: absolute; right: 5px; top: -28px; display: block; text-indent: -9999em; width: 30px; height: 28px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-width: 1px; border-color: #9a9a9a; background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -webkit-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -moz-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -o-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -ms-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, linear-gradient(#ffffff, #d9d9d9); } +.cms table.ss-gridfield-table tr th button.ss-gridfield-button-filter.ss-ui-button { position: absolute; top: 0; right: 0; display: block; text-indent: -9999em; width: 30px; height: 28px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-width: 1px; border-color: #9a9a9a; background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -webkit-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -moz-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -o-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, -ms-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat -40px 6px, linear-gradient(#ffffff, #d9d9d9); } .cms table.ss-gridfield-table tr th button.ss-gridfield-button-filter.ss-ui-button.hover-alike:active { background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4199cd), color-stop(100%, #2e7ead)); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -webkit-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -moz-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -o-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -ms-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, linear-gradient(#4199cd, #2e7ead); -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -o-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); } .cms table.ss-gridfield-table tr th button.ss-gridfield-button-filter.ss-ui-button.hover-alike { background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4199cd), color-stop(100%, #2e7ead)); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -webkit-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -moz-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -o-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, -ms-linear-gradient(#4199cd, #2e7ead); background: url(../images/icons/filter-icons.png) no-repeat -16px 6px, linear-gradient(#4199cd, #2e7ead); } -.cms table.ss-gridfield-table tr th button.ss-gridfield-button-reset.ss-ui-button { position: absolute; right: 34px; top: -28px; display: block; text-indent: -9999em; width: 30px; height: 28px; float: right; border-radius: 0px; border-bottom-width: 1px; border-color: #9a9a9a; background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -webkit-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -moz-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -o-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -ms-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, linear-gradient(#ffffff, #d9d9d9); } +.cms table.ss-gridfield-table tr th button.ss-gridfield-button-reset.ss-ui-button { position: absolute; right: 29px; top: 0; display: block; text-indent: -9999em; width: 30px; height: 28px; float: right; border-radius: 0px; border-bottom-width: 1px; border-color: #9a9a9a; background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #d9d9d9)); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -webkit-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -moz-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -o-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, -ms-linear-gradient(#ffffff, #d9d9d9); background: url(../images/icons/filter-icons.png) no-repeat 8px 5px, linear-gradient(#ffffff, #d9d9d9); } .cms table.ss-gridfield-table tr th button.ss-gridfield-button-reset.ss-ui-button.filtered:hover { background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff0000), color-stop(100%, #cc0000)); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -webkit-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -moz-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -o-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -ms-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, linear-gradient(#ff0000, #cc0000); } .cms table.ss-gridfield-table tr th button.ss-gridfield-button-reset.ss-ui-button.filtered:active { background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff0000), color-stop(100%, #cc0000)); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -webkit-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -moz-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -o-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, -ms-linear-gradient(#ff0000, #cc0000); background: url(../images/icons/filter-icons.png) no-repeat 8px -17px, linear-gradient(#ff0000, #cc0000); -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -o-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort { padding: 2px; } diff --git a/forms/CheckboxField.php b/forms/CheckboxField.php index 22af0ebb8..ba58e33e3 100644 --- a/forms/CheckboxField.php +++ b/forms/CheckboxField.php @@ -1,15 +1,12 @@ value = ($value) ? 1 : 0; return $this; @@ -23,17 +20,6 @@ class CheckboxField extends FormField { return ($this->value) ? 1 : 0; } - /** - * Returns a restricted field holder used within things like FieldGroups - */ - function SmallFieldHolder() { - $result = $this->Field(); - if($t = $this->Title()) { - $result .= " "; - } - return $result; - } - function getAttributes() { $attrs = parent::getAttributes(); $attrs['value'] = 1; @@ -65,6 +51,7 @@ class CheckboxField extends FormField { /** * Readonly version of a checkbox field - "Yes" or "No". + * * @package forms * @subpackage fields-basic */ diff --git a/forms/CheckboxSetField.php b/forms/CheckboxSetField.php index 1c4650b2a..b43e1fdb2 100644 --- a/forms/CheckboxSetField.php +++ b/forms/CheckboxSetField.php @@ -33,11 +33,9 @@ * @subpackage fields-basic */ class CheckboxSetField extends OptionsetField { - - protected $template = 'CheckboxSetField'; /** - * @var Array + * @var array */ protected $defaultItems = array(); @@ -130,7 +128,7 @@ class CheckboxSetField extends OptionsetField { $properties = array_merge($properties, array('Options' => new ArrayList($options))); - return $this->customise($properties)->renderWith($this->getTemplate()); + return $this->customise($properties)->renderWith($this->getTemplates()); } /** @@ -288,5 +286,4 @@ class CheckboxSetField extends OptionsetField { function ExtraOptions() { return FormField::ExtraOptions(); } - } \ No newline at end of file diff --git a/forms/CompositeField.php b/forms/CompositeField.php index 0cff056d0..9116457f9 100644 --- a/forms/CompositeField.php +++ b/forms/CompositeField.php @@ -1,8 +1,11 @@ children + * + * Implements sequentialisation - so that when we're saving / loading data, we + * can populate a tabbed form properly. All of the children are stored in + * $this->children + * * @package forms * @subpackage fields-structural */ @@ -33,11 +36,6 @@ class CompositeField extends FormField { */ protected $tag = 'div'; - /** - * @var string - */ - protected $template = "CompositeField"; - /** * @var String Optional description for this set of fields. * If the {@link $tag} property is set to use a 'fieldset', this will be @@ -152,32 +150,6 @@ class CompositeField extends FormField { ); } - public function Field($properties = array()) { - $props = $this->customise($properties); - - return $props->renderWith($this->getTemplate()); - } - - /** - * @param array - */ - function FieldHolder($properties = array()) { - $props = $this->customise($properties); - - return $props->renderWith($this->getTemplate()); - } - - /** - * Returns the fields in the restricted field holder. - * - * @param array - */ - function SmallFieldHolder($properties = array()) { - $obj = ($properties) ? $this->customise($properties) : $this; - - return $obj->renderWith($this->getTemplate()); - } - /** * Add all of the non-composite fields contained within this field to the * list. diff --git a/forms/DropdownField.php b/forms/DropdownField.php index 86d16a507..feb001e7a 100644 --- a/forms/DropdownField.php +++ b/forms/DropdownField.php @@ -75,8 +75,6 @@ * @subpackage fields-basic */ class DropdownField extends FormField { - - protected $template = 'DropdownField'; /** * @var boolean $source Associative or numeric array of all dropdown items, @@ -158,7 +156,7 @@ class DropdownField extends FormField { $properties = array_merge($properties, array('Options' => new ArrayList($options))); - return $this->customise($properties)->renderWith($this->getTemplate()); + return parent::Field($properties); } function getAttributes() { diff --git a/forms/FieldGroup.php b/forms/FieldGroup.php index e2bf10092..a32d47dfb 100644 --- a/forms/FieldGroup.php +++ b/forms/FieldGroup.php @@ -85,29 +85,6 @@ class FieldGroup extends CompositeField { return preg_replace("/[^a-zA-Z0-9]+/", "", $this->title); } - - /** - * Generates the field HTML with the HTML for child {@link FormField} - * - * @param array $properties custom properties for the template - */ - function Field($properties = array()) { - $props = $this->customise(new ArrayData($properties)); - - return $props->renderWith('FieldGroupField'); - } - - /** - * Generates the field HTML with the HTML for child {@link FormField} - * - * @param array $properties custom properties for the template - */ - function FieldHolder($properties = array()) { - $props = $this->customise(new ArrayData($properties)); - - return $props->renderWith('FieldGroupHolder'); - } - /** * Set an odd/even class * diff --git a/forms/FileField.php b/forms/FileField.php index edc365218..c3e88d1b0 100644 --- a/forms/FileField.php +++ b/forms/FileField.php @@ -42,8 +42,6 @@ * @subpackage fields-files */ class FileField extends FormField { - - protected $template = 'FileField'; /** * Restrict filesize for either all filetypes @@ -112,8 +110,11 @@ class FileField extends FormField { } public function Field($properties = array()) { - $properties = array_merge($properties, array('MaxFileSize' => $this->getValidator()->getAllowedMaxFileSize())); - return $this->customise($properties)->renderWith($this->getTemplate()); + $properties = array_merge($properties, array( + 'MaxFileSize' => $this->getValidator()->getAllowedMaxFileSize() + )); + + return parent::Field($properties); } function getAttributes() { diff --git a/forms/FileIFrameField.php b/forms/FileIFrameField.php index e4345a7e7..748df037e 100644 --- a/forms/FileIFrameField.php +++ b/forms/FileIFrameField.php @@ -12,8 +12,6 @@ */ class FileIFrameField extends FileField { - protected $template = 'FileIFrameField'; - public static $allowed_actions = array ( 'iframe', 'EditFileForm', diff --git a/forms/FormAction.php b/forms/FormAction.php index 9c04a9f30..ee1d27671 100644 --- a/forms/FormAction.php +++ b/forms/FormAction.php @@ -20,8 +20,6 @@ */ class FormAction extends FormField { - protected $template = 'FormAction'; - protected $action; /** @@ -36,12 +34,14 @@ class FormAction extends FormField { /** * Create a new action button. + * * @param action The method to call when the button is clicked * @param title The label on the button * @param form The parent form, auto-set when the field is placed inside a form */ function __construct($action, $title = "", $form = null) { $this->action = "action_$action"; + parent::__construct($this->action, $title, null, $form); } @@ -67,7 +67,8 @@ class FormAction extends FormField { 'UseButtonTag' => $this->useButtonTag ) ); - return $this->customise($properties)->renderWith($this->getTemplate()); + + return parent::Field($properties); } function FieldHolder($properties = array()) { diff --git a/forms/FormField.php b/forms/FormField.php index 2baf6ea3e..1bc4bd927 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -57,31 +57,35 @@ class FormField extends RequestHandler { protected $containerFieldSet; /** - * @var $readonly boolean + * @var boolean */ protected $readonly = false; /** - * @var $disabled boolean + * @var boolean */ protected $disabled = false; /** - * @var String - */ - protected $template = 'FormField'; - - /** - * @var Custom Validation Message for the Field + * @var string custom validation message for the Field */ protected $customValidationMessage = ""; - + /** - * Template name to render this FormField field holder into. + * Name of the template used to render this form field. If not set, then + * will look up the class ancestry for the first matching template where + * the template name equals the class name. + * + * To explicitly use a custom template or one named other than the form + * field see {@link setTemplate()}, {@link setFieldHolderTemplate()} + * * @var string */ - protected $fieldHolderTemplate = 'FieldHolder'; - + protected + $template, + $fieldHolderTemplate, + $smallFieldHolderTemplate; + /** * @var array All attributes on the form field (not the field holder). * Partially determined based on other instance properties, please use {@link getAttributes()}. @@ -268,7 +272,7 @@ class FormField extends RequestHandler { * Uses {@link Message()} and {@link MessageType()} to add validatoin * error classes which can be used to style the contained tags. * - * @return String CSS-classnames + * @return string CSS-classnames */ function extraClass() { $classes = array(); @@ -323,8 +327,8 @@ class FormField extends RequestHandler { * CreditCardField, CurrencyField, DateField, DatetimeField, FieldGroup, GridField, HtmlEditorField, * ImageField, ImageFormAction, InlineFormAction, ListBoxField, etc. * - * @param String - * @param String + * @param string + * @param string */ function setAttribute($name, $value) { $this->attributes[$name] = $value; @@ -335,7 +339,7 @@ class FormField extends RequestHandler { * Get an HTML attribute defined by the field, or added through {@link setAttribute()}. * Caution: Doesn't work on all fields, see {@link setAttribute()}. * - * @return String + * @return string */ function getAttribute($name) { $attrs = $this->getAttributes(); @@ -355,13 +359,14 @@ class FormField extends RequestHandler { 'disabled' => $this->isDisabled(), 'title' => $this->getDescription(), ); + return array_merge($attrs, $this->attributes); } /** * @param Array Custom attributes to process. Falls back to {@link getAttributes()}. * If at least one argument is passed as a string, all arguments act as excludes by name. - * @return String HTML attributes, ready for insertion into an HTML tag + * @return string HTML attributes, ready for insertion into an HTML tag */ function getAttributesHTML($attrs = null) { $exclude = (is_string($attrs)) ? func_get_args() : null; @@ -431,28 +436,7 @@ class FormField extends RequestHandler { function getForm() { return $this->form; } - - /** - * @return String - */ - public function getFieldHolderTemplate() { - return $this->fieldHolderTemplate; - } - - /** - * Set name of template (without path or extension) for the holder, - * which in turn is responsible for rendering {@link Field()}. - * - * Caution: Not consistently implemented in all subclasses, - * please check the {@link Field()} method on the subclass for support. - * - * @param String - */ - public function setFieldHolderTemplate($template) { - $this->fieldHolderTemplate = $template; - return $this; - } - + /** * Return TRUE if security token protection is enabled on the parent {@link Form}. * @@ -461,6 +445,7 @@ class FormField extends RequestHandler { public function securityTokenEnabled() { $form = $this->getForm(); if(!$form) return false; + return $form->getSecurityToken()->isEnabled(); } @@ -471,6 +456,7 @@ class FormField extends RequestHandler { function setError($message, $messageType) { $this->message = $message; $this->messageType = $messageType; + return $this; } @@ -479,10 +465,11 @@ class FormField extends RequestHandler { * format of Please Fill In XXX. Different from setError() as * that appends it to the standard error messaging * - * @param String Message for the error + * @param string Message for the error */ public function setCustomValidationMessage($msg) { $this->customValidationMessage = $msg; + return $this; } @@ -492,7 +479,7 @@ class FormField extends RequestHandler { * error is defined on {@link Validator}. * * @todo Should the default error message be stored here instead - * @return String + * @return string */ public function getCustomValidationMessage() { return $this->customValidationMessage; @@ -503,20 +490,65 @@ class FormField extends RequestHandler { * Caution: Not consistently implemented in all subclasses, * please check the {@link Field()} method on the subclass for support. * - * @param String + * @param string */ function setTemplate($template) { $this->template = $template; + return $this; } /** - * @return String + * @return string */ function getTemplate() { return $this->template; } + /** + * @return string + */ + public function getFieldHolderTemplate() { + return $this->fieldHolderTemplate; + } + + /** + * Set name of template (without path or extension) for the holder, + * which in turn is responsible for rendering {@link Field()}. + * + * Caution: Not consistently implemented in all subclasses, + * please check the {@link Field()} method on the subclass for support. + * + * @param string + */ + public function setFieldHolderTemplate($template) { + $this->fieldHolderTemplate = $template; + + return $this; + } + + /** + * @return string + */ + public function getSmallFieldHolderTemplate() { + return $this->smallFieldHolderTemplate; + } + + /** + * Set name of template (without path or extension) for the small holder, + * which in turn is responsible for rendering {@link Field()}. + * + * Caution: Not consistently implemented in all subclasses, + * please check the {@link Field()} method on the subclass for support. + * + * @param string + */ + public function setSmallFieldHolderTemplate($template) { + $this->smallFieldHolderTemplate = $template; + + return $this; + } + /** * Returns the form field - used by templates. * Although FieldHolder is generally what is inserted into templates, all of the field holder @@ -529,7 +561,8 @@ class FormField extends RequestHandler { */ function Field($properties = array()) { $obj = ($properties) ? $this->customise($properties) : $this; - return $obj->renderWith($this->getTemplate()); + + return $obj->renderWith($this->getTemplates()); } /** @@ -544,28 +577,80 @@ class FormField extends RequestHandler { */ function FieldHolder($properties = array()) { $obj = ($properties) ? $this->customise($properties) : $this; - return $obj->renderWith($this->getFieldHolderTemplate()); + + return $obj->renderWith($this->getFieldHolderTemplates()); } /** * Returns a restricted field holder used within things like FieldGroups. + * + * @param array $properties + * + * @return string */ - function SmallFieldHolder() { - $result = ''; - // set label - if($title = $this->RightTitle()){ - $result .= "\n"; - } elseif($title = $this->LeftTitle()) { - $result .= "\n"; - } elseif($title = $this->Title()) { - $result .= "\n"; + function SmallFieldHolder($properties = array()) { + $obj = ($properties) ? $this->customise($properties) : $this; + + return $obj->renderWith($this->getSmallFieldHolderTemplates()); + } + + /** + * Returns an array of templates to use for rendering {@link FieldH} + * + * @return array + */ + public function getTemplates() { + return $this->_templates($this->getTemplate()); + } + + /** + * Returns an array of templates to use for rendering {@link FieldHolder} + * + * @return array + */ + public function getFieldHolderTemplates() { + return $this->_templates( + $this->getFieldHolderTemplate(), + '_holder' + ); + } + + /** + * Returns an array of templates to use for rendering {@link SmallFieldHolder} + * + * @return array + */ + public function getSmallFieldHolderTemplates() { + return $this->_templates( + $this->getSmallFieldHolderTemplate(), + '_holder_small' + ); + } + + + /** + * Generate an array of classname strings to use for rendering this form + * field into HTML + * + * @param string $custom custom template (if set) + * @param string $suffix template suffix + * + * @return array $stack a stack of + */ + private function _templates($custom = null, $suffix = null) { + $matches = array(); + + foreach(array_reverse(ClassInfo::ancestry($this)) as $className) { + $matches[] = $className . $suffix; + + if($className == "FormField") break; } - - $result .= $this->Field(); - - return $result; - } - + + if($custom) array_unshift($matches, $custom); + + return $matches; + } + /** * Returns true if this field is a composite field. * To create composite field types, you should subclass {@link CompositeField}. @@ -722,7 +807,7 @@ class FormField extends RequestHandler { } /** - * @return String + * @return string */ function getDescription() { return $this->description; diff --git a/forms/HeaderField.php b/forms/HeaderField.php index 669c197a8..5b938a4d0 100644 --- a/forms/HeaderField.php +++ b/forms/HeaderField.php @@ -1,13 +1,13 @@ to