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:
parent
684f7dd7dc
commit
01129d5297
1 changed files with 2 additions and 1 deletions
|
@ -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') ]) : '-'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue