From 677765705d721a93c8159b69b438b5b1757085e6 Mon Sep 17 00:00:00 2001 From: Anton Kikin Date: Fri, 16 Nov 2018 21:13:14 +0300 Subject: luci-mod-system: fstab: fix table cell rendering without unmount button Signed-off-by: Anton Kikin --- .../luasrc/model/cbi/admin_system/fstab.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua b/modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua index 6f0921fdcf..4a31146a03 100644 --- a/modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua +++ b/modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua @@ -117,14 +117,14 @@ function used.cfgvalue(self, section) end unmount = v:option(Button, "unmount", translate("Unmount")) +function unmount.cfgvalue(self, section) + return non_system_mounts[section].umount +end + unmount.render = function(self, section, scope) - if non_system_mounts[section].umount then - self.title = translate("Unmount") - self.inputstyle = "remove" - Button.render(self, section, scope) - else - luci.http.write(" ") - end + self.title = translate("Unmount") + self.inputstyle = "remove" + Button.render(self, section, scope) end unmount.write = function(self, section) -- cgit v1.2.3