We require value. Using label will be very messy with translation

This commit is contained in:
Sondre Njåstad
2024-03-19 04:04:41 +01:00
parent 9a0d612dff
commit bf75ebd4dd
+1 -1
View File
@@ -57,7 +57,7 @@ function UIAlert(options){
for(let y=0; y<options.buttons.length; y++){
h += `<button class="button button-block button-${html_encode(options.buttons[y].type)} alert-resp-button"
data-label="${html_encode(options.buttons[y].label)}"
data-value="${html_encode(options.buttons[y].value ?? options.buttons[y].label)}"
data-value="${html_encode(options.buttons[y].value)}"
${options.buttons[y].type === 'primary' ? 'autofocus' : ''}
>${html_encode(options.buttons[y].label)}</button>`;
}