When we add a Color field and give it a label, the label gets overridden by the label "Color" for HTML5 Color Widget.

Comments

VinayLondhe created an issue. See original summary.

VinayLondhe’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

The below patch fixes the issue.

VinayLondhe’s picture

Title: Change title of the Color field from Color to Field Label » Change title of the Color field from Color to Field Label in HTML5 Color Picker

Status: Needs review » Needs work

The last submitted patch, 2: color_field-color-label-2711841-2-8.x-2.x.patch, failed testing.

geerlingguy’s picture

Version: 8.x-2.0-rc1 » 8.x-2.x-dev
Status: Needs work » Needs review

Just ran into this as well; the field is always labeled 'Color' no matter what field label you choose.

dakku’s picture

++

RedLucas25’s picture

This is really just taking the code from the other widgets and using it for this widget, with one added check to set a default if there is no label. I am using this and it works. I think it's mergable.

RedLucas25’s picture

Anonymous’s picture

Add a fieldset with field label

kreatil’s picture

Status: Needs review » Reviewed & tested by the community

I manually applied patch#2. I can confirm it works.

trebormc’s picture

modify the patch to works in rc3 version

Status: Reviewed & tested by the community » Needs work
skippednote’s picture

StatusFileSize
new1.01 KB

Renders field label and description as setup during field creation. Also accommodates for the opacity field.

skippednote’s picture

StatusFileSize
new9.22 KB

Renders field label and description as setup during field creation. Also accommodates for the opacity field.
Missed adding the description when there is no opacity in the previous comment.

skippednote’s picture

skippednote’s picture

StatusFileSize
new1.18 KB
nickdickinsonwilde’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 16: 16_color_field_rc3_2711841.patch, failed testing. View results

nickdickinsonwilde’s picture

Issue tags: +Needs tests

Now that #2985211: Create a test suit is in progress, tests are mandatory.
However, automatic tests are broken on the CI level for this project right now, so reports may be inaccurate especially if it says "Patch failed to apply" that is bunk quite likely.

nickdickinsonwilde’s picture

Status: Needs work » Fixed
Issue tags: -Needs tests

Added test that fails without this patch. Committed patch and test. Thanks a lot!

  • NickWilde committed ccd7318 on 8.x-2.x
    Issue #2711841 by skippednote, VinayLondhe, trebormc, NickWilde: Change...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.