diff --git a/administrator/components/com_config/tmpl/component/default.php b/administrator/components/com_config/tmpl/component/default.php index 20e0efe552dd0..3bae731d4530b 100644 --- a/administrator/components/com_config/tmpl/component/default.php +++ b/administrator/components/com_config/tmpl/component/default.php @@ -77,7 +77,7 @@
label); ?> -
+
@@ -98,7 +98,7 @@
label); ?> -
+
diff --git a/layouts/joomla/form/renderfield.php b/layouts/joomla/form/renderfield.php index e65d7433be898..5e4cbcea8c6ab 100644 --- a/layouts/joomla/form/renderfield.php +++ b/layouts/joomla/form/renderfield.php @@ -35,6 +35,12 @@ $id = $name . '-desc'; $hide = empty($options['hiddenLabel']) ? '' : ' visually-hidden'; $hideDescription = empty($options['hiddenDescription']) ? false : $options['hiddenDescription']; + +if ($parentclass) +{ + $class .= ' ' . $parentclass; +} + ?>
>
diff --git a/libraries/src/Form/Field/CalendarField.php b/libraries/src/Form/Field/CalendarField.php index 782878cb9ac82..90ff32ca3b56a 100644 --- a/libraries/src/Form/Field/CalendarField.php +++ b/libraries/src/Form/Field/CalendarField.php @@ -81,6 +81,14 @@ class CalendarField extends FormField */ protected $layout = 'joomla.form.field.calendar'; + /** + * The parent class of the field + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $parentclass; + /** * Method to get certain otherwise inaccessible properties from the form field object. * diff --git a/libraries/src/Form/Field/EditorField.php b/libraries/src/Form/Field/EditorField.php index 63e06575c15cf..d04fd5f222138 100644 --- a/libraries/src/Form/Field/EditorField.php +++ b/libraries/src/Form/Field/EditorField.php @@ -101,6 +101,14 @@ class EditorField extends TextareaField */ protected $editorType; + /** + * The parent class of the field + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $parentclass; + /** * Method to get certain otherwise inaccessible properties from the form field object. * diff --git a/libraries/src/Form/Field/MediaField.php b/libraries/src/Form/Field/MediaField.php index 34bb06ddfb48b..3764eb6ea7e68 100644 --- a/libraries/src/Form/Field/MediaField.php +++ b/libraries/src/Form/Field/MediaField.php @@ -109,6 +109,14 @@ class MediaField extends FormField */ protected $layout = 'joomla.form.field.media'; + /** + * The parent class of the field + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $parentclass; + /** * Method to get certain otherwise inaccessible properties from the form field object. * diff --git a/libraries/src/Form/Field/NumberField.php b/libraries/src/Form/Field/NumberField.php index 2c3b0454733d9..a75256f1fd474 100644 --- a/libraries/src/Form/Field/NumberField.php +++ b/libraries/src/Form/Field/NumberField.php @@ -65,6 +65,14 @@ class NumberField extends FormField */ protected $layout = 'joomla.form.field.number'; + /** + * The parent class of the field + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $parentclass; + /** * Method to get certain otherwise inaccessible properties from the form field object. * diff --git a/libraries/src/Form/Field/RulesField.php b/libraries/src/Form/Field/RulesField.php index 538cdf4aa4f31..bf51e9dda6fc6 100644 --- a/libraries/src/Form/Field/RulesField.php +++ b/libraries/src/Form/Field/RulesField.php @@ -65,6 +65,14 @@ class RulesField extends FormField */ protected $assetField; + /** + * The parent class of the field + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $parentclass; + /** * Method to get certain otherwise inaccessible properties from the form field object. * diff --git a/libraries/src/Form/FormField.php b/libraries/src/Form/FormField.php index 87d2554f8c824..17bca92fe6a9b 100644 --- a/libraries/src/Form/FormField.php +++ b/libraries/src/Form/FormField.php @@ -331,6 +331,14 @@ abstract class FormField */ protected $showon; + /** + * The parent class of the field + * + * @var string + * @since __DEPLOY_VERSION__ + */ + protected $parentclass; + /** * The count value for generated name field * @@ -450,6 +458,7 @@ public function __get($name) case 'spellcheck': case 'validationtext': case 'showon': + case 'parentclass': return $this->$name; case 'input': @@ -514,6 +523,7 @@ public function __set($name, $value) case 'validationtext': case 'group': case 'showon': + case 'parentclass': case 'default': $this->$name = (string) $value; break; @@ -680,6 +690,8 @@ public function setup(\SimpleXMLElement $element, $value, $group = null) $this->layout = !empty($this->element['layout']) ? (string) $this->element['layout'] : $this->layout; + $this->parentclass = isset($this->element['parentclass']) ? (string) $this->element['parentclass'] : $this->parentclass; + // Add required to class list if field is required. if ($this->required) { @@ -1339,6 +1351,7 @@ protected function getLayoutData() 'value' => $this->value, 'dataAttribute' => $this->renderDataAttributes(), 'dataAttributes' => $this->dataAttributes, + 'parentclass' => $this->parentclass, ]; }