From 01129d5297fa83069a2b1953e19184fe152d8b90 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 16 Apr 2020 15:35:51 +0200 Subject: [PATCH] luci-mod-system: mounts.js: disable umount button in readonly map Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/view/system/mounts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js index 7ee91f5aec..e0a9226562 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js @@ -212,7 +212,8 @@ return view.extend({ '%.2f%% (%1024.2mB)'.format(100 / this.mounts[i].size * used, used), umount ? E('button', { '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') ]) : '-' ]); } -- 2.30.2