diff --git a/app/src/Extensions/CompositeFieldExtension.php b/app/src/Extensions/CompositeFieldExtension.php index b29797b..f0b8313 100644 --- a/app/src/Extensions/CompositeFieldExtension.php +++ b/app/src/Extensions/CompositeFieldExtension.php @@ -11,10 +11,16 @@ use SilverStripe\ORM\DataExtension; class CompositeFieldExtension extends CompositeField { + public function extraClass() + { + return 'composite '.parent::extraClass(); + } + public function getAttributes() { $attrs = parent::getAttributes(); unset($attrs['name'], $attrs['type'], $attrs['disabled'], $attrs['readonly'], $attrs['autofocus']); + return $attrs; } } diff --git a/app/templates/SilverStripe/Forms/CompositeField_holder.ss b/app/templates/SilverStripe/Forms/CompositeField_holder.ss new file mode 100644 index 0000000..59fb7a2 --- /dev/null +++ b/app/templates/SilverStripe/Forms/CompositeField_holder.ss @@ -0,0 +1,7 @@ +<$Tag $AttributesHTML> + <% if $Tag == 'fieldset' && $Legend %> + + <% end_if %> + + $Field +$Tag> diff --git a/app/templates/SilverStripe/Forms/FormField_holder.ss b/app/templates/SilverStripe/Forms/FormField_holder.ss new file mode 100644 index 0000000..cd8b14e --- /dev/null +++ b/app/templates/SilverStripe/Forms/FormField_holder.ss @@ -0,0 +1,16 @@ +