diff --git a/administrator/components/com_config/view/component/tmpl/default.php b/administrator/components/com_config/view/component/tmpl/default.php index 0be7229786596..5b0d347e7a98d 100644 --- a/administrator/components/com_config/view/component/tmpl/default.php +++ b/administrator/components/com_config/view/component/tmpl/default.php @@ -78,7 +78,10 @@ form->getFieldset($name) as $field) : ?> - + type === 'Spacer' ? ' field-spacer' : ''; + ?> showon) : ?> 'auto', 'relative' => true)); ?> @@ -87,7 +90,7 @@ hidden) : ?> input; ?> -
> +
>
label; ?> diff --git a/administrator/templates/isis/css/template-rtl.css b/administrator/templates/isis/css/template-rtl.css index fb167de934b7c..ce22438c9a38a 100644 --- a/administrator/templates/isis/css/template-rtl.css +++ b/administrator/templates/isis/css/template-rtl.css @@ -7289,7 +7289,6 @@ h6 { max-height: 800px; } .form-horizontal .control-label { - width: auto; padding-right: 5px; text-align: left; } @@ -7301,6 +7300,9 @@ h6 { width: 220px; } } +.form-horizontal .field-spacer>.control-label { + width: auto; +} .form-horizontal #jform_catid_chzn { vertical-align: middle; } diff --git a/administrator/templates/isis/css/template.css b/administrator/templates/isis/css/template.css index ed9c052c45bd4..1e69925a6bbff 100644 --- a/administrator/templates/isis/css/template.css +++ b/administrator/templates/isis/css/template.css @@ -7289,7 +7289,6 @@ h6 { max-height: 800px; } .form-horizontal .control-label { - width: auto; padding-right: 5px; text-align: left; } @@ -7301,6 +7300,9 @@ h6 { width: 220px; } } +.form-horizontal .field-spacer>.control-label { + width: auto; +} .form-horizontal #jform_catid_chzn { vertical-align: middle; } diff --git a/administrator/templates/isis/less/blocks/_forms.less b/administrator/templates/isis/less/blocks/_forms.less index 96454aff95051..6570d79762c5c 100644 --- a/administrator/templates/isis/less/blocks/_forms.less +++ b/administrator/templates/isis/less/blocks/_forms.less @@ -7,7 +7,6 @@ .form-horizontal { // Float the labels left .control-label { - width: auto; padding-right: 5px; text-align: left; // Set a width for the spacer hr so it shows @@ -18,6 +17,9 @@ } } } + .field-spacer>.control-label{ + width: auto; + } #jform_catid_chzn { vertical-align: middle; } @@ -209,7 +211,7 @@ textarea.noResize { border-width: 0 0 1px 1px; .icon-minus:before { content: "I"; - + } } &.btn-primary { @@ -277,15 +279,15 @@ textarea.noResize { padding-bottom: 15px; } } - table, thead, tbody, th, td, tr { - display: block; + table, thead, tbody, th, td, tr { + display: block; } table { border: 1px solid #ddd; } thead { - - th { + + th { position: absolute; top: -9999px; left: -9999px; @@ -298,15 +300,15 @@ textarea.noResize { } } } - tr { + tr { margin: 0; padding: 0; border: 0; } - td { + td { border: none; position: relative; - padding-left: 50%; + padding-left: 50%; } tbody { td:first-of-type { @@ -315,13 +317,13 @@ textarea.noResize { &:before {top:18px;} } } - - td:before { + + td:before { content: attr(data-column); position: absolute; top: 13px; left: 10px; - padding-right: 10px; + padding-right: 10px; } } } diff --git a/layouts/joomla/content/options_default.php b/layouts/joomla/content/options_default.php index 9b428317e8824..e36532c308390 100644 --- a/layouts/joomla/content/options_default.php +++ b/layouts/joomla/content/options_default.php @@ -25,6 +25,7 @@ foreach ($displayData->form->getFieldset($fieldname) as $field) { $datashowon = ''; + $groupClass = $field->type === 'Spacer' ? ' field-spacer' : ''; if ($field->showon) { @@ -33,7 +34,7 @@ $datashowon = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; } ?> -
> +
> showlabel) || $displayData->showlabel) : ?>
label; ?>
diff --git a/libraries/joomla/form/fields/spacer.php b/libraries/joomla/form/fields/spacer.php index 11c165bcf4ef7..386df34849924 100644 --- a/libraries/joomla/form/fields/spacer.php +++ b/libraries/joomla/form/fields/spacer.php @@ -104,4 +104,20 @@ protected function getTitle() { return $this->getLabel(); } + + /** + * Method to get a control group with label and input. + * + * @param array $options Options to be passed into the rendering of the field + * + * @return string A string containing the html for the control group + * + * @since __DEPLOY_VERSION__ + */ + public function renderField($options = array()) + { + $options['class'] = empty($options['class']) ? 'field-spacer' : $options['class'] . ' field-spacer'; + + return parent::renderField($options); + } }