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)
This commit is contained in:
Yohan Boniface 2025-04-10 21:46:27 +02:00 committed by GitHub
commit 985d91a9c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -925,7 +925,8 @@ Fields.Url = class extends Fields.Input {
Fields.Switch = class extends Fields.CheckBox {
getTemplate() {
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() {