luci-mod-system: mounts.js: disable umount button in readonly map

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-04-16 15:35:51 +02:00
parent 684f7dd7dc
commit 01129d5297

View file

@ -212,7 +212,8 @@ return view.extend({
'%.2f%% (%1024.2mB)'.format(100 / this.mounts[i].size * used, used), '%.2f%% (%1024.2mB)'.format(100 / this.mounts[i].size * used, used),
umount ? E('button', { umount ? E('button', {
'class': 'btn cbi-button-remove', 'class': 'btn cbi-button-remove',
'click': ui.createHandlerFn(view, 'handleUmount', m, this.mounts[i].mount) 'click': ui.createHandlerFn(view, 'handleUmount', m, this.mounts[i].mount),
'disabled': this.map.readonly || null
}, [ _('Unmount') ]) : '-' }, [ _('Unmount') ]) : '-'
]); ]);
} }