From 6c6381dd8b1e1652dfef0fc757ba385932fd98f7 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 10 May 2021 18:09:34 +0100 Subject: [PATCH 01/25] [4.0] fieldset legend (#33729) * [4.0] fieldset legend the repaint removed the lines around a fieldset. Unfortunately this makes it impossible to see which fields are in a fieldset and the legend is unclear what it is for. This pr puts the border back. This is a css change so dont forget to rebuild the css ### Before ### After * switch color to be based on the same values as the tab border etc --- administrator/templates/atum/scss/blocks/_layout.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/administrator/templates/atum/scss/blocks/_layout.scss b/administrator/templates/atum/scss/blocks/_layout.scss index de851fab49b81..70ba25bbd684a 100644 --- a/administrator/templates/atum/scss/blocks/_layout.scss +++ b/administrator/templates/atum/scss/blocks/_layout.scss @@ -1,12 +1,14 @@ .options-form { width: 100%; + padding: 1vw 2vw; margin-bottom: 1rem; color: var(--atum-text-dark); + border: 1px solid var(--atum-bg-dark-20); > legend { float: none; width: auto; - padding: 0; + padding: 0 1rem; font-weight: $font-weight-bold; color: var(--atum-text-dark); background-color: $white; From 2fa496f9da3177d0dbfe64ee01cee128ce17559e Mon Sep 17 00:00:00 2001 From: Quy Date: Mon, 10 May 2021 10:49:51 -0700 Subject: [PATCH 02/25] Change icon (#33747) --- .../components/com_config/src/View/Application/HtmlView.php | 2 +- .../components/com_config/src/View/Component/HtmlView.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_config/src/View/Application/HtmlView.php b/administrator/components/com_config/src/View/Application/HtmlView.php index c9630113cb50f..094fd0738885c 100644 --- a/administrator/components/com_config/src/View/Application/HtmlView.php +++ b/administrator/components/com_config/src/View/Application/HtmlView.php @@ -113,7 +113,7 @@ public function display($tpl = null) */ protected function addToolbar() { - ToolbarHelper::title(Text::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'sliders-h config'); + ToolbarHelper::title(Text::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'cog config'); ToolbarHelper::apply('application.apply'); ToolbarHelper::divider(); ToolbarHelper::save('application.save'); diff --git a/administrator/components/com_config/src/View/Component/HtmlView.php b/administrator/components/com_config/src/View/Component/HtmlView.php index 554c7b9b3ccb6..468a3bb31ec1f 100644 --- a/administrator/components/com_config/src/View/Component/HtmlView.php +++ b/administrator/components/com_config/src/View/Component/HtmlView.php @@ -114,7 +114,7 @@ public function display($tpl = null) */ protected function addToolbar() { - ToolbarHelper::title(Text::_($this->component->option . '_configuration'), 'sliders-h config'); + ToolbarHelper::title(Text::_($this->component->option . '_configuration'), 'cog config'); ToolbarHelper::apply('component.apply'); ToolbarHelper::divider(); ToolbarHelper::save('component.save'); From 3c3b5264b3406517df18c645f0b166e44d2fd606 Mon Sep 17 00:00:00 2001 From: Quy Date: Mon, 10 May 2021 12:47:25 -0700 Subject: [PATCH 03/25] Remove edit button in toolbar (#33744) --- .../com_installer/src/View/Updatesites/HtmlView.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/administrator/components/com_installer/src/View/Updatesites/HtmlView.php b/administrator/components/com_installer/src/View/Updatesites/HtmlView.php index 0848de5ec0cc5..35eed84e891f5 100644 --- a/administrator/components/com_installer/src/View/Updatesites/HtmlView.php +++ b/administrator/components/com_installer/src/View/Updatesites/HtmlView.php @@ -103,11 +103,6 @@ protected function addToolbar(): void // Get the toolbar object instance $toolbar = Toolbar::getInstance('toolbar'); - if ($canDo->get('core.edit')) - { - ToolbarHelper::editList('updatesite.edit'); - } - if ($canDo->get('core.edit.state')) { $dropdown = $toolbar->dropdownButton('status-group') From 8e3dcfba103a93cd1a7f0d40da3dce7fb9462825 Mon Sep 17 00:00:00 2001 From: Yatharth Vyas Date: Tue, 11 May 2021 01:51:02 +0530 Subject: [PATCH 04/25] add id (#33738) --- .../components/com_content/tmpl/featured/default.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_content/tmpl/featured/default.php b/administrator/components/com_content/tmpl/featured/default.php index 8d447835792ca..0e82db195d6a7 100644 --- a/administrator/components/com_content/tmpl/featured/default.php +++ b/administrator/components/com_content/tmpl/featured/default.php @@ -220,7 +220,8 @@ $options = [ 'transitions' => $transitions, 'title' => Text::_($item->stage_title), - 'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)) + 'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)), + 'id' => 'workflow-' . $item->id ]; echo (new TransitionButton($options)) @@ -233,7 +234,8 @@ 'articles.', - 'disabled' => $workflow_featured || !$canChange + 'disabled' => $workflow_featured || !$canChange, + 'id' => 'featured-' . $item->id ]; echo (new FeaturedButton) @@ -244,7 +246,8 @@ 'articles.', - 'disabled' => $workflow_state || !$canChange + 'disabled' => $workflow_state || !$canChange, + 'id' => 'state-' . $item->id ]; echo (new PublishedButton)->render((int) $item->state, $i, $options, $item->publish_up, $item->publish_down); From c49846dcab9be5142dc7e79dfd7e3f024485b4cb Mon Sep 17 00:00:00 2001 From: Hans Kuijpers Date: Tue, 11 May 2021 09:22:42 +0200 Subject: [PATCH 05/25] [4.0] make Atum error page use template params (#33718) --- administrator/templates/atum/error_full.php | 52 ++++++++++---------- administrator/templates/atum/error_login.php | 41 +++++++-------- 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/administrator/templates/atum/error_full.php b/administrator/templates/atum/error_full.php index aab9042e819d3..15ce117ffa89f 100644 --- a/administrator/templates/atum/error_full.php +++ b/administrator/templates/atum/error_full.php @@ -13,7 +13,6 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; -use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; /** @var \Joomla\CMS\Document\ErrorDocument $this */ @@ -29,6 +28,7 @@ $task = $input->get('task', 'display'); $cpanel = $option === 'com_cpanel'; $hiddenMenu = $app->input->get('hidemainmenu'); +$params = $app->getTemplate(true)->params; // Browsers support SVG favicons $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']); @@ -36,35 +36,35 @@ $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']); // Template params -$logoBrandLarge = $this->params->get('logoBrandLarge') - ? Uri::root() . htmlspecialchars($this->params->get('logoBrandLarge'), ENT_QUOTES) +$logoBrandLarge = $params->get('logoBrandLarge') + ? Uri::root() . htmlspecialchars($params->get('logoBrandLarge'), ENT_QUOTES) : $this->baseurl . '/templates/' . $this->template . '/images/logos/brand-large.svg'; -$logoBrandSmall = $this->params->get('logoBrandSmall') - ? Uri::root() . htmlspecialchars($this->params->get('logoBrandSmall'), ENT_QUOTES) +$logoBrandSmall = $params->get('logoBrandSmall') + ? Uri::root() . htmlspecialchars($params->get('logoBrandSmall'), ENT_QUOTES) : $this->baseurl . '/templates/' . $this->template . '/images/logos/brand-small.svg'; -$logoBrandLargeAlt = empty($this->params->get('logoBrandLargeAlt')) && empty($this->params->get('emptyLogoBrandLargeAlt')) +$logoBrandLargeAlt = empty($params->get('logoBrandLargeAlt')) && empty($params->get('emptyLogoBrandLargeAlt')) ? 'alt=""' - : 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"'; -$logoBrandSmallAlt = empty($this->params->get('logoBrandSmallAlt')) && empty($this->params->get('emptyLogoBrandSmallAlt')) + : 'alt="' . htmlspecialchars($params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"'; +$logoBrandSmallAlt = empty($params->get('logoBrandSmallAlt')) && empty($params->get('emptyLogoBrandSmallAlt')) ? 'alt=""' - : 'alt="' . htmlspecialchars($this->params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"'; - - // Get the hue value - preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches); - - // Enable assets - $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')) - ->useStyle('template.active.language') - ->useStyle('template.user') - ->addInlineStyle(':root { - --hue: ' . $matches[1] . '; - --atum-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . '; - --atum-text-dark: ' . $this->params->get('text-dark', '#495057') . '; - --atum-text-light: ' . $this->params->get('text-light', '#ffffff') . '; - --atum-link-color: ' . $this->params->get('link-color', '#2a69b8') . '; - --atum-special-color: ' . $this->params->get('special-color', '#001B4C') . '; - }'); + : 'alt="' . htmlspecialchars($params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"'; + +// Get the hue value +preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $params->get('hue', 'hsl(214, 63%, 20%)'), $matches); + +// Enable assets +$wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')) + ->useStyle('template.active.language') + ->useStyle('template.user') + ->addInlineStyle(':root { + --hue: ' . $matches[1] . '; + --atum-bg-light: ' . $params->get('bg-light', '#f0f4fb') . '; + --atum-text-dark: ' . $params->get('text-dark', '#495057') . '; + --atum-text-light: ' . $params->get('text-light', '#ffffff') . '; + --atum-link-color: ' . $params->get('link-color', '#2a69b8') . '; + --atum-special-color: ' . $params->get('special-color', '#001B4C') . '; + }'); // Override 'template.active' asset to set correct ltr/rtl dependency $wa->registerStyle('template.active', '', [], [], ['template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]); @@ -72,7 +72,7 @@ // Set some meta data $this->setMetaData('viewport', 'width=device-width, initial-scale=1'); -$monochrome = (bool) $this->params->get('monochrome'); +$monochrome = (bool) $params->get('monochrome'); // @see administrator/templates/atum/html/layouts/status.php $statusModules = LayoutHelper::render('status', ['modules' => 'status']); diff --git a/administrator/templates/atum/error_login.php b/administrator/templates/atum/error_login.php index 0efeec01248ed..26d4ea3b569ea 100644 --- a/administrator/templates/atum/error_login.php +++ b/administrator/templates/atum/error_login.php @@ -26,6 +26,7 @@ $view = $input->get('view', ''); $layout = $input->get('layout', 'default'); $task = $input->get('task', 'display'); +$params = $app->getTemplate(true)->params; // Browsers support SVG favicons $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']); @@ -33,28 +34,28 @@ $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']); // Template params -$logoBrandLarge = $this->params->get('logoBrandLarge') - ? Uri::root() . htmlspecialchars($this->params->get('logoBrandLarge'), ENT_QUOTES) +$logoBrandLarge = $params->get('logoBrandLarge') + ? Uri::root() . htmlspecialchars($params->get('logoBrandLarge'), ENT_QUOTES) : $this->baseurl . '/templates/' . $this->template . '/images/logos/brand-large.svg'; -$loginLogo = $this->params->get('loginLogo') - ? Uri::root() . $this->params->get('loginLogo') +$loginLogo = $params->get('loginLogo') + ? Uri::root() . $params->get('loginLogo') : $this->baseurl . '/templates/' . $this->template . '/images/logos/login.svg'; -$logoBrandSmall = $this->params->get('logoBrandSmall') - ? Uri::root() . htmlspecialchars($this->params->get('logoBrandSmall'), ENT_QUOTES) +$logoBrandSmall = $params->get('logoBrandSmall') + ? Uri::root() . htmlspecialchars($params->get('logoBrandSmall'), ENT_QUOTES) : $this->baseurl . '/templates/' . $this->template . '/images/logos/brand-small.svg'; -$logoBrandLargeAlt = empty($this->params->get('logoBrandLargeAlt')) && empty($this->params->get('emptyLogoBrandLargeAlt')) +$logoBrandLargeAlt = empty($params->get('logoBrandLargeAlt')) && empty($params->get('emptyLogoBrandLargeAlt')) ? 'alt=""' - : 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"'; -$logoBrandSmallAlt = empty($this->params->get('logoBrandSmallAlt')) && empty($this->params->get('emptyLogoBrandSmallAlt')) + : 'alt="' . htmlspecialchars($params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"'; +$logoBrandSmallAlt = empty($params->get('logoBrandSmallAlt')) && empty($params->get('emptyLogoBrandSmallAlt')) ? 'alt=""' - : 'alt="' . htmlspecialchars($this->params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"'; -$loginLogoAlt = empty($this->params->get('loginLogoAlt')) && empty($this->params->get('emptyLoginLogoAlt')) + : 'alt="' . htmlspecialchars($params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"'; +$loginLogoAlt = empty($params->get('loginLogoAlt')) && empty($params->get('emptyLoginLogoAlt')) ? 'alt=""' - : 'alt="' . htmlspecialchars($this->params->get('loginLogoAlt'), ENT_COMPAT, 'UTF-8') . '"'; + : 'alt="' . htmlspecialchars($params->get('loginLogoAlt'), ENT_COMPAT, 'UTF-8') . '"'; - // Get the hue value -preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches); +// Get the hue value +preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $params->get('hue', 'hsl(214, 63%, 20%)'), $matches); // Enable assets $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')) @@ -62,11 +63,11 @@ ->useStyle('template.user') ->addInlineStyle(':root { --hue: ' . $matches[1] . '; - --atum-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . '; - --atum-text-dark: ' . $this->params->get('text-dark', '#495057') . '; - --atum-text-light: ' . $this->params->get('text-light', '#ffffff') . '; - --atum-link-color: ' . $this->params->get('link-color', '#2a69b8') . '; - --atum-special-color: ' . $this->params->get('special-color', '#001B4C') . '; + --atum-bg-light: ' . $params->get('bg-light', '#f0f4fb') . '; + --atum-text-dark: ' . $params->get('text-dark', '#495057') . '; + --atum-text-light: ' . $params->get('text-light', '#ffffff') . '; + --atum-link-color: ' . $params->get('link-color', '#2a69b8') . '; + --atum-special-color: ' . $params->get('special-color', '#001B4C') . '; }'); // Override 'template.active' asset to set correct ltr/rtl dependency @@ -75,7 +76,7 @@ // Set some meta data $this->setMetaData('viewport', 'width=device-width, initial-scale=1'); -$monochrome = (bool) $this->params->get('monochrome'); +$monochrome = (bool) $params->get('monochrome'); // @see administrator/templates/atum/html/layouts/status.php $statusModules = LayoutHelper::render('status', ['modules' => 'status']); From 92aa07576e8c99ad1ddd7abc316e01a0c6413ba8 Mon Sep 17 00:00:00 2001 From: Hans Kuijpers Date: Tue, 11 May 2021 09:25:08 +0200 Subject: [PATCH 06/25] [4.0] fix position of Joomla button in Atum header (#33719) * :art: apply indent same as login.php * :wastebasket: removal comments just like login.php * :truck: let wrapper start with html for container followed by sidebar. Just like in login.php * :wastebasket: removal obsolete div with className header-inside * :bug: add className d-flex to div with id = header. Solving alignment --- administrator/templates/atum/error_full.php | 164 +++++++++---------- administrator/templates/atum/error_login.php | 120 +++++++------- administrator/templates/atum/login.php | 4 +- 3 files changed, 136 insertions(+), 152 deletions(-) diff --git a/administrator/templates/atum/error_full.php b/administrator/templates/atum/error_full.php index 15ce117ffa89f..57045b3c73894 100644 --- a/administrator/templates/atum/error_full.php +++ b/administrator/templates/atum/error_full.php @@ -87,15 +87,13 @@ - + - - + +
+
+ + + +
+
+
+
+ +
+
- -
-
- - - -
- - - - -
-
+ +
+ +
- +

+
+ error->getCode(); ?> + error->getMessage(), ENT_QUOTES, 'UTF-8'); ?> +
+ debug) : ?> +
+ renderBacktrace(); ?> + + error->getPrevious()) : ?> + + _error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?> + + setError($this->_error->getPrevious()); ?> + +

+

_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>

+ renderBacktrace(); ?> + setError($this->_error->getPrevious()); ?> + + + setError($this->error); ?> + +
+ +

+ + + +

-
-
- -
- - - -
-
-

-
- error->getCode(); ?> - error->getMessage(), ENT_QUOTES, 'UTF-8'); ?> -
- debug) : ?> -
- renderBacktrace(); ?> - - error->getPrevious()) : ?> - - _error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?> - - setError($this->_error->getPrevious()); ?> - -

-

_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>

- renderBacktrace(); ?> - setError($this->_error->getPrevious()); ?> - - - setError($this->error); ?> - -
+ + countModules('bottom')) : ?> + -

- - - -

+
+
- countModules('bottom')) : ?> - - + + + + - - + - - + diff --git a/administrator/templates/atum/error_login.php b/administrator/templates/atum/error_login.php index 26d4ea3b569ea..350cf2393110a 100644 --- a/administrator/templates/atum/error_login.php +++ b/administrator/templates/atum/error_login.php @@ -91,14 +91,13 @@ - + - + +
+
+
+
+
+
+
+ >
- +

+ +
+ error->getCode(); ?> + error->getMessage(), ENT_QUOTES, 'UTF-8'); ?> +
+ debug) : ?> +
+ renderBacktrace(); ?> + + error->getPrevious()) : ?> + + _error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?> + + setError($this->_error->getPrevious()); ?> + +

+

_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>

+ renderBacktrace(); ?> + setError($this->_error->getPrevious()); ?> + + + setError($this->error); ?> + +
+ +
-
- - - + + +
+ + - - + diff --git a/administrator/templates/atum/login.php b/administrator/templates/atum/login.php index 8dcc16c598b54..bf9ffbdb5d86c 100644 --- a/administrator/templates/atum/login.php +++ b/administrator/templates/atum/login.php @@ -95,6 +95,7 @@ +