From e5b3f82f8c4298cf6d1440e0576e5af623ff8b20 Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 08:17:39 +0000 Subject: [PATCH 1/4] sanitise select tag in DropdownField Docblock --- src/Forms/DropdownField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/DropdownField.php b/src/Forms/DropdownField.php index b7f29c41f..a18fc878c 100644 --- a/src/Forms/DropdownField.php +++ b/src/Forms/DropdownField.php @@ -6,7 +6,7 @@ use SilverStripe\ORM\ArrayList; use SilverStripe\View\ArrayData; /** - * Dropdown field, created from a tag. + * Multi-line listbox field, created from a select tag. * * Usage * From 25d8795c7091601f5c643dd2d93c46bce1442b2d Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 09:52:06 +0000 Subject: [PATCH 3/4] sanitise FormField docblock --- src/Forms/FormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php index f19c6425e..aba34bf23 100644 --- a/src/Forms/FormField.php +++ b/src/Forms/FormField.php @@ -606,7 +606,7 @@ class FormField extends RequestHandler } /** - * Set an HTML attribute on the field element, mostly an tag. + * Set an HTML attribute on the field element, mostly an input tag. * * Some attributes are best set through more specialized methods, to avoid interfering with * built-in behaviour: From 3274f29c00b7ade82bc161a6d88bb016e587b206 Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 10:02:24 +0000 Subject: [PATCH 4/4] sanitise more docblocks --- src/Forms/FormField.php | 4 ++-- src/Forms/GroupedDropdownField.php | 8 ++++---- src/Forms/ListboxField.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php index aba34bf23..7a9efd5d4 100644 --- a/src/Forms/FormField.php +++ b/src/Forms/FormField.php @@ -1264,7 +1264,7 @@ class FormField extends RequestHandler * * The field type is the class name with the word Field dropped off the end, all lowercase. * - * It's handy for assigning HTML classes. Doesn't signify the attribute. + * It's handy for assigning HTML classes. Doesn't signify the input type attribute. * * @see {link getAttributes()}. * @@ -1293,7 +1293,7 @@ class FormField extends RequestHandler /** * Describe this field, provide help text for it. * - * By default, renders as a underneath the form field. + * By default, renders as a span class="description" underneath the form field. * * @param string $description * diff --git a/src/Forms/GroupedDropdownField.php b/src/Forms/GroupedDropdownField.php index 0d839df8b..aeb44fa4d 100644 --- a/src/Forms/GroupedDropdownField.php +++ b/src/Forms/GroupedDropdownField.php @@ -6,14 +6,14 @@ use SilverStripe\ORM\ArrayList; use SilverStripe\View\ArrayData; /** - * Grouped dropdown, using tags. + * Grouped dropdown, using optgroup tags. * * $source parameter (from DropdownField) must be a two dimensional array. - * The first level of the array is used for the , and the second + * The first level of the array is used for the optgroup, and the second * level are the for each group. * - * Returns a field with a single element. + * @see DropdownField for a simple select field with a single element. * @see CheckboxSetField for multiple selections through checkboxes. * @see OptionsetField for single selections via radiobuttons. * @see TreeDropdownField for a rich and customizeable UI that can visualize a tree of selectable elements @@ -62,7 +62,7 @@ class ListboxField extends MultiSelectField } /** - * Returns a