diff --git a/flextype/core/Forms.php b/flextype/core/Forms.php index a1d93d75..2d4ffd17 100644 --- a/flextype/core/Forms.php +++ b/flextype/core/Forms.php @@ -11,6 +11,8 @@ namespace Flextype; use Flextype\Component\Arr\Arr; use Flextype\Component\Form\Form; +use Flextype\Component\Html\Html; +use Flextype\Component\Filesystem\Filesystem; use Psr\Http\Message\ServerRequestInterface as Request; use function count; use function date; @@ -117,7 +119,7 @@ class Forms $property['attributes'] = Arr::keyExists($property, 'attributes') ? $property['attributes'] : []; // Create attribute class - $property['attributes']['class'] = Arr::keyExists($property, 'attributes.class') ? $this->field_class . ' ' . $property['attributes']['class'] : $this->field_class; + $property['attributes']['class'] = Arr::keyExists($property, 'attributes.class') ? $property['attributes']['class'] : ''; // Create attribute size $property['size'] = Arr::keyExists($property, 'size') ? $this->sizes[$property['size']] : $this->sizes['12']; @@ -169,6 +171,9 @@ class Forms case 'visibility_select': $form_field = $this->visibilitySelectField($field_id, $field_name, ['draft' => __('admin_entries_draft'), 'visible' => __('admin_entries_visible'), 'hidden' => __('admin_entries_hidden')], (! empty($form_value) ? $form_value : 'visible'), $property); break; + case 'heading': + $form_field = $this->headingField($field_id, $property); + break; case 'tags': $form_field = $this->tagsField($field_id, $field_name, $form_value, $property); break; @@ -263,6 +268,7 @@ class Forms protected function mediaSelectField(string $field_id, string $field_name, array $options, string $value, array $property) : string { $property['attributes']['id'] = $field_id; + $property['attributes']['class'] .= ' ' . $this->field_class; $field = '