summaryrefslogtreecommitdiffstats
path: root/samba-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-10-27 02:47:51 +0000
committerTed Trask <ttrask01@yahoo.com>2012-10-27 02:47:51 +0000
commite1e2380851d4b16dd6387fe237b4faf1d4dd69fd (patch)
tree73e6d492c38feb02b2c903e4b7fdc43c1ac37bb5 /samba-model.lua
parentaecf84c7d5d8d45396cd15c9e6490ac821c36558 (diff)
downloadacf-samba-e1e2380851d4b16dd6387fe237b4faf1d4dd69fd.tar.bz2
acf-samba-e1e2380851d4b16dd6387fe237b4faf1d4dd69fd.tar.xz
Removed unneeded views by updating CFE for autoview
Diffstat (limited to 'samba-model.lua')
-rw-r--r--samba-model.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/samba-model.lua b/samba-model.lua
index eddbe51..a1f17e6 100644
--- a/samba-model.lua
+++ b/samba-model.lua
@@ -135,8 +135,8 @@ end
function get_join()
local connect = {}
- connect.login = cfe({ label="Domain Controller login" })
- connect.password = cfe({ label="Domain Controller password" })
+ connect.login = cfe({ label="Domain Controller login", seq=1 })
+ connect.password = cfe({ type="password", label="Domain Controller password", seq=2 })
configcontent = configcontent or fs.read_file(configfile) or ""
config = config or format.parse_ini_file(configcontent) or {}
@@ -217,12 +217,12 @@ function read_share(self, clientdata)
name = name or ""
local sharecfg = config[name] or {}
- share.name = cfe({ value=name, label="Share Name" })
- share.browseable = cfe({ type="boolean", value=true, label="Browseable", descr="Controls whether this share is seen in the list of available shares" })
+ share.name = cfe({ value=name, label="Share Name", seq=0 })
+ share.browseable = cfe({ type="boolean", value=true, label="Browseable", descr="Controls whether this share is seen in the list of available shares", seq=4 })
if sharecfg.browseable then share.browseable.value = config_to_bool(sharecfg.browseable)
elseif sharecfg.browsable then share.browseable.value = config_to_bool(sharecfg.browsable) end
- share.comment = cfe({ value=sharecfg.comment or "", label="Comment" })
- share.guest = cfe({ type="select", value="No", label="Guest Access", option={"No", "OK", "Only"} })
+ share.comment = cfe({ value=sharecfg.comment or "", label="Comment", seq=2 })
+ share.guest = cfe({ type="select", value="No", label="Guest Access", option={"No", "OK", "Only"}, seq=5 })
if config_to_bool(sharecfg.public) or config_to_bool(sharecfg["guest ok"]) then
if config_to_bool(sharecfg["only guest"]) or config_to_bool(sharecfg["guest only"]) then
share.guest.value = "Only"
@@ -231,15 +231,15 @@ function read_share(self, clientdata)
end
end
--share.invalid_users =
- share.path = cfe({ value=sharecfg.path or sharecfg.directory or "", label="Path" })
- share.printable = cfe({ type="boolean", value=config_to_bool(sharecfg.printable) or config_to_bool(sharecfg["print ok"]) or false, label="Printable" })
+ share.path = cfe({ value=sharecfg.path or sharecfg.directory or "", label="Path", seq=3 })
+ share.printable = cfe({ type="boolean", value=config_to_bool(sharecfg.printable) or config_to_bool(sharecfg["print ok"]) or false, label="Printable", seq=6 })
--share.read_list =
- share.writeable = cfe({ type="boolean", value=config_to_bool(sharecfg.writeable) or config_to_bool(sharecfg.writable) or (sharecfg["read only"] and not config_to_bool(sharecfg["read only"])) or false, label="Writable" })
+ share.writeable = cfe({ type="boolean", value=config_to_bool(sharecfg.writeable) or config_to_bool(sharecfg.writable) or (sharecfg["read only"] and not config_to_bool(sharecfg["read only"])) or false, label="Writable", seq=7 })
--share.username = (same as user and users)
--share.valid_users =
- share.valid = cfe({ type="boolean", value=not sharecfg["-valid"] or config_to_bool(sharecfg["-valid"]), label="Enabled" })
+ share.valid = cfe({ type="boolean", value=not sharecfg["-valid"] or config_to_bool(sharecfg["-valid"]), label="Enabled", seq=1 })
--share.write_list =
- share.other = cfe({ type="longtext", value={}, label="Other parameters" })
+ share.other = cfe({ type="longtext", value={}, label="Other parameters", seq=8 })
local reverseparams = {browseable=1, browsable=2, comment=3, public=4, ["guest ok"]=5, ["only guest"]=6, ["guest only"]=7, path=8, directory=9, printable=10, ["print ok"]=11, writeable=12, writable=13, ["read only"]=14, ["-valid"]=15 }
for name,value in pairs(sharecfg) do
if not reverseparams[name] then