No Code Attached Yet
avatar CerberusMkII
CerberusMkII
25 Nov 2021

What needs to be fixed

File location:
layouts/joomla/form/field/color/advanced.php

Line 83 on Joomla 3.10.3 and line 88 on Joomla 4.04 is missing the following field attribute handling:
$required = $required ? ' required aria-required="true"' : '';

Why this should be fixed

Without the fix this is happening:
<input type="text" name="jform[color]" id="jform_color" value="#000000" placeholder="#rrggbb" class="minicolors required hex" data-position="default" data-control="hue"1 data-format="hex"/>

data-control="hue"1, it's applying an integer instead of correct formatting.

How would you fix it

Add the following above $autocomplete as done in other field layout files:
$required = $required ? ' required aria-required="true"' : '';

Result should be:
<input type="text" name="jform[color]" id="jform_color" value="#000000" placeholder="#rrggbb" class="minicolors required hex" data-position="default" data-control="hue" required aria-required="true" data-format="hex"/>

Side Effects expected

As far as I can tell everything should work fine.

avatar CerberusMkII CerberusMkII - open - 25 Nov 2021
avatar joomla-cms-bot joomla-cms-bot - change - 25 Nov 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Nov 2021
avatar richard67 richard67 - close - 26 Nov 2021
avatar richard67
richard67 - comment - 26 Nov 2021

Closing as having a pull request. Please test #36122 . Thanks in advance.

avatar richard67 richard67 - change - 26 Nov 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-11-26 16:50:18
Closed_By richard67

Add a Comment

Login with GitHub to post a comment