Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions layouts/joomla/form/renderfield.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
$hideDescription = empty($options['hiddenDescription']) ? false : $options['hiddenDescription'];
$descClass = ($options['descClass'] ?? '') ?: (!empty($options['inlineHelp']) ? 'hide-aware-inline-help d-none' : '');

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

?>
Expand All @@ -54,7 +54,7 @@
<?php echo $input; ?>
<?php if (!$hideDescription && !empty($description)) : ?>
<div id="<?php echo $id; ?>" class="<?php echo $descClass ?>">
<small class="form-text">
<small class="form-text text-muted">
<?php echo $description; ?>
</small>
</div>
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Form/Field/CalendarField.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ class CalendarField extends FormField
protected $layout = 'joomla.form.field.calendar';

/**
* The parent class of the field
* The control class of the field
*
* @var string
* @since 4.0.0
*/
protected $parentclass;
protected $controlclass;

/**
* Method to get certain otherwise inaccessible properties from the form field object.
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Form/Field/EditorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ class EditorField extends TextareaField
protected $editorType;

/**
* The parent class of the field
* The control class of the field
*
* @var string
* @since 4.0.0
*/
protected $parentclass;
protected $controlclass;

/**
* Method to get certain otherwise inaccessible properties from the form field object.
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Form/Field/MediaField.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ class MediaField extends FormField
protected $layout = 'joomla.form.field.media';

/**
* The parent class of the field
* The control class of the field
*
* @var string
* @since 4.0.0
*/
protected $parentclass;
protected $controlclass;

/**
* Method to get certain otherwise inaccessible properties from the form field object.
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Form/Field/NumberField.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ class NumberField extends FormField
protected $layout = 'joomla.form.field.number';

/**
* The parent class of the field
* The control class of the field
*
* @var string
* @since 4.0.0
*/
protected $parentclass;
protected $controlclass;

/**
* Method to get certain otherwise inaccessible properties from the form field object.
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Form/Field/RulesField.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ class RulesField extends FormField
protected $assetField;

/**
* The parent class of the field
* The control class of the field
*
* @var string
* @since 4.0.0
*/
protected $parentclass;
protected $controlclass;

/**
* Method to get certain otherwise inaccessible properties from the form field object.
Expand Down
12 changes: 6 additions & 6 deletions libraries/src/Form/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@ abstract class FormField implements DatabaseAwareInterface
protected $showon;

/**
* The parent class of the field
* The control class of the field
*
* @var string
* @since 4.0.0
*/
protected $parentclass;
protected $controlclass;

/**
* The count value for generated name field
Expand Down Expand Up @@ -458,7 +458,7 @@ public function __get($name)
case 'spellcheck':
case 'validationtext':
case 'showon':
case 'parentclass':
case 'controlclass':
return $this->$name;

case 'input':
Expand Down Expand Up @@ -519,7 +519,7 @@ public function __set($name, $value)
case 'validationtext':
case 'group':
case 'showon':
case 'parentclass':
case 'controlclass':
case 'default':
case 'autocomplete':
$this->$name = (string) $value;
Expand Down Expand Up @@ -672,7 +672,7 @@ 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;
$this->controlclass = isset($this->element['controlclass']) ? (string) $this->element['controlclass'] : $this->controlclass;

// Add required to class list if field is required.
if ($this->required) {
Expand Down Expand Up @@ -1286,7 +1286,7 @@ protected function getLayoutData()
'value' => $this->value,
'dataAttribute' => $this->renderDataAttributes(),
'dataAttributes' => $this->dataAttributes,
'parentclass' => $this->parentclass,
'controlclass' => $this->controlclass,
];
}

Expand Down
3 changes: 2 additions & 1 deletion templates/cassiopeia/html/layouts/chromes/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

$moduleTag = $params->get('module_tag', 'div');
$moduleAttribs = [];
$moduleAttribs['class'] = $module->position . ' card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$moduleAttribs['class'] = $module->position . ' card ' . ($params->get('moduleclass_sfx') ?
(htmlspecialchars($params->get('moduleclass_sfx'), ENT_QUOTES, 'UTF-8')) : $attribs['class']);
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
Expand Down
3 changes: 2 additions & 1 deletion templates/cassiopeia/html/layouts/chromes/noCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

$moduleTag = $params->get('module_tag', 'div');
$moduleAttribs = [];
$moduleAttribs['class'] = $module->position . ' no-card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$moduleAttribs['class'] = $module->position . ' no-card ' . ($params->get('moduleclass_sfx') ?
(htmlspecialchars($params->get('moduleclass_sfx'), ENT_QUOTES, 'UTF-8')) : $attribs['class']);
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
Expand Down
2 changes: 2 additions & 0 deletions templates/cassiopeia/templateDetails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<position>menu</position>
<position>search</position>
<position>banner</position>
<position>top</position>
<position>top-a</position>
<position>top-b</position>
<position>main-top</position>
Expand All @@ -38,6 +39,7 @@
<position>sidebar-right</position>
<position>bottom-a</position>
<position>bottom-b</position>
<position>bottom</position>
<position>footer</position>
<position>debug</position>
</positions>
Expand Down