Allow label to trigger ignore checkbox

Add an unique id to the ignoreCheckbox in the banner and update the "for" attribute in the label.
This commit is contained in:
Harald Leithner 2019-12-26 20:30:53 +01:00 committed by GitHub
parent 059d0ccf50
commit 1339e26cd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,8 +69,8 @@ kpxcBanner.create = async function(credentials = {}) {
const dismissButton = kpxcUI.createElement('button', 'kpxc-button kpxc-red-button', { 'id': 'kpxc-banner-btn-dismiss' }, tr('popupButtonDismiss'));
const separator = kpxcUI.createElement('div', 'kpxc-separator');
const ignoreCheckbox = kpxcUI.createElement('input', 'kpxc-checkbox', { type: 'checkbox', name: 'ignoreCheckbox' });
const checkboxLabel = kpxcUI.createElement('label', 'kpxc-checkbox-label', { for: 'ignoreCheckbox' }, tr('popupButtonIgnore'));
const ignoreCheckbox = kpxcUI.createElement('input', 'kpxc-checkbox', { type: 'checkbox', name: 'ignoreCheckbox', id: 'kpxc-banner-ignoreCheckbox' });
const checkboxLabel = kpxcUI.createElement('label', 'kpxc-checkbox-label', { for: 'kpxc-banner-ignoreCheckbox' }, tr('popupButtonIgnore'));
// No existing credentials to update --> disable Update button
if (credentials.list.length === 0) {