Merge pull request #2297 from tano-systems/fix-fstab-mount-table

luci-mod-system: fstab: fix table cell rendering without unmount button
This commit is contained in:
Jo-Philipp Wich 2018-11-16 21:37:35 +01:00 committed by GitHub
commit e991e09d47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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(" ")
end
self.title = translate("Unmount")
self.inputstyle = "remove"
Button.render(self, section, scope)
end
unmount.write = function(self, section)