Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<?php if (!$isGrandchild && $hasParent) : ?>
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-menu options-form">
<legend><?php echo Text::_($fieldSet->label); ?></legend>
<div>
<div class="form-grid">
<?php elseif (!$hasParent) : ?>
<?php if ($opentab) : ?>

Expand All @@ -98,7 +98,7 @@

<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-menu options-form">
<legend><?php echo Text::_($fieldSet->label); ?></legend>
<div>
<div class="form-grid">
<?php $opentab = 2; ?>
<?php endif; ?>
<?php endif; ?>
Expand Down
6 changes: 6 additions & 0 deletions layouts/joomla/form/renderfield.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
$id = $name . '-desc';
$hide = empty($options['hiddenLabel']) ? '' : ' visually-hidden';
$hideDescription = empty($options['hiddenDescription']) ? false : $options['hiddenDescription'];

if ($parentclass)
{
$class .= ' ' . $parentclass;
}

?>
<div class="control-group<?php echo $class; ?>"<?php echo $rel; ?>>
<div class="control-label<?php echo $hide; ?>"><?php echo $label; ?></div>
Expand Down
8 changes: 8 additions & 0 deletions libraries/src/Form/Field/CalendarField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 8 additions & 0 deletions libraries/src/Form/Field/EditorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 8 additions & 0 deletions libraries/src/Form/Field/MediaField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 8 additions & 0 deletions libraries/src/Form/Field/NumberField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
8 changes: 8 additions & 0 deletions libraries/src/Form/Field/RulesField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
13 changes: 13 additions & 0 deletions libraries/src/Form/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -450,6 +458,7 @@ public function __get($name)
case 'spellcheck':
case 'validationtext':
case 'showon':
case 'parentclass':
return $this->$name;

case 'input':
Expand Down Expand Up @@ -514,6 +523,7 @@ public function __set($name, $value)
case 'validationtext':
case 'group':
case 'showon':
case 'parentclass':
case 'default':
$this->$name = (string) $value;
break;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -1339,6 +1351,7 @@ protected function getLayoutData()
'value' => $this->value,
'dataAttribute' => $this->renderDataAttributes(),
'dataAttributes' => $this->dataAttributes,
'parentclass' => $this->parentclass,
];
}

Expand Down