luci-mod-system: fstab: fix table cell rendering without unmount button 2297/head
authorAnton Kikin <a.kikin@tano-systems.com>
Fri, 16 Nov 2018 18:13:14 +0000 (21:13 +0300)
committerAnton Kikin <a.kikin@tano-systems.com>
Fri, 16 Nov 2018 20:20:21 +0000 (23:20 +0300)
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab.lua

index 6f0921fdcfac417b5f35ab5e2019d767cced3895..4a31146a03e13cf735865e9b5067dcd85df82780 100644 (file)
@@ -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("&#160;")
-       end
+       self.title = translate("Unmount")
+       self.inputstyle = "remove"
+       Button.render(self, section, scope)
 end
 
 unmount.write = function(self, section)