luci-app-package-manager: fix 'autoremove' checkbox uneditable

In HTML, the following lines of code are equivalent:
```
<input disabled />
<input disabled="true" />
<input disabled="false" />
<input disabled="any" />
```
If you want to cancel the 'disabled' flag, you must completely remove it from the HTML instead of assigning a value.

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
This commit is contained in:
Liangbin Lian
2025-06-26 17:09:01 +08:00
committed by Paul Donald
parent f458c39c74
commit 8b5dfabdf3

View File

@@ -970,7 +970,7 @@ function handleRemove(ev)
desc || '',
E('div', { 'style': 'display:flex; justify-content:space-between; flex-wrap:wrap' }, [
E('label', { 'class': 'cbi-checkbox', 'style': 'float:left' }, [
E('input', { 'id': 'autoremove-cb', 'type': 'checkbox', 'checked': 'checked', 'name': 'autoremove', 'disabled': isReadonlyView || L.hasSystemFeature('apk') }), ' ',
E('input', { 'id': 'autoremove-cb', 'type': 'checkbox', 'checked': 'checked', 'name': 'autoremove', 'disabled': isReadonlyView || L.hasSystemFeature('apk') || null }), ' ',
E('label', { 'for': 'autoremove-cb' }), ' ',
_('Automatically remove unused dependencies')
]),