Change button look in icon form

This commit is contained in:
Yohan Boniface 2023-09-05 09:41:09 +02:00
parent bfd36bc0e1
commit 91e71eccda

View file

@ -561,7 +561,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
L.DomEvent.on(el, 'click', this.fetchIconList, this) L.DomEvent.on(el, 'click', this.fetchIconList, this)
} }
} }
this.button = L.DomUtil.create('a', '', this.buttonsContainer) this.button = L.DomUtil.create('a', 'button', this.buttonsContainer)
this.button.textContent = this.value() ? L._('Change symbol') : L._('Add symbol') this.button.textContent = this.value() ? L._('Change symbol') : L._('Add symbol')
this.button.href = '#' this.button.href = '#'
L.DomEvent.on(this.button, 'click', L.DomEvent.stop).on( L.DomEvent.on(this.button, 'click', L.DomEvent.stop).on(
@ -609,13 +609,13 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
for (const idx in data.pictogram_list) { for (const idx in data.pictogram_list) {
this.addIconPreview(data.pictogram_list[idx]) this.addIconPreview(data.pictogram_list[idx])
} }
const cancelButton = L.DomUtil.create('a', '', this.pictogramsContainer) const closeButton = L.DomUtil.create('a', 'button', this.pictogramsContainer)
cancelButton.textContent = L._('Cancel') closeButton.textContent = L._('Close')
cancelButton.href = '#' closeButton.href = '#'
cancelButton.style.display = 'block' closeButton.style.display = 'block'
cancelButton.style.clear = 'both' closeButton.style.clear = 'both'
L.DomEvent.on(cancelButton, 'click', L.DomEvent.stop).on( L.DomEvent.on(closeButton, 'click', L.DomEvent.stop).on(
cancelButton, closeButton,
'click', 'click',
function (e) { function (e) {
this.pictogramsContainer.innerHTML = '' this.pictogramsContainer.innerHTML = ''
@ -624,7 +624,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
this this
) )
const customButton = L.DomUtil.create('a', '', this.pictogramsContainer) const customButton = L.DomUtil.create('a', '', this.pictogramsContainer)
customButton.textContent = L._('Set symbol') customButton.textContent = "> " + L._('Free content (advanced)')
customButton.href = '#' customButton.href = '#'
customButton.style.display = 'block' customButton.style.display = 'block'
customButton.style.clear = 'both' customButton.style.clear = 'both'