Compare commits

...

2 commits

Author SHA1 Message Date
Yohan Boniface
985d91a9c7
fix: display back help button in switch fields (#2634)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
cf #2615

Before:

![image](https://github.com/user-attachments/assets/bac68a6b-6c74-4f10-8d3c-26536dc1ecad)

After:

![image](https://github.com/user-attachments/assets/43c4a0b3-a892-423a-8c20-b7c6304f3182)
2025-04-10 21:46:27 +02:00
Yohan Boniface
7348f0bf4f fix: display back help button in switch fields
cf #2615
2025-04-10 20:24:35 +02:00

View file

@ -925,7 +925,8 @@ Fields.Url = class extends Fields.Input {
Fields.Switch = class extends Fields.CheckBox { Fields.Switch = class extends Fields.CheckBox {
getTemplate() { getTemplate() {
const label = this.properties.label const label = this.properties.label
return `${super.getTemplate()}<label title="${label}" for="${this.id}" data-ref=customLabel>${label}</label>` const help = this.properties.helpEntries?.join() || ''
return `${super.getTemplate()}<label title="${label}" for="${this.id}" data-ref=customLabel data-help="${help}">${label}</label>`
} }
build() { build() {