diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-10-27 02:47:51 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-10-27 02:47:51 +0000 |
commit | e1e2380851d4b16dd6387fe237b4faf1d4dd69fd (patch) | |
tree | 73e6d492c38feb02b2c903e4b7fdc43c1ac37bb5 | |
parent | aecf84c7d5d8d45396cd15c9e6490ac821c36558 (diff) | |
download | acf-samba-e1e2380851d4b16dd6387fe237b4faf1d4dd69fd.tar.bz2 acf-samba-e1e2380851d4b16dd6387fe237b4faf1d4dd69fd.tar.xz |
Removed unneeded views by updating CFE for autoview
l--------- | samba-createshare-html.lsp | 1 | ||||
-rw-r--r-- | samba-editshare-html.lsp | 11 | ||||
-rw-r--r-- | samba-join-html.lsp | 16 | ||||
-rw-r--r-- | samba-model.lua | 22 |
4 files changed, 11 insertions, 39 deletions
diff --git a/samba-createshare-html.lsp b/samba-createshare-html.lsp deleted file mode 120000 index 59159fa..0000000 --- a/samba-createshare-html.lsp +++ /dev/null @@ -1 +0,0 @@ -samba-editshare-html.lsp
\ No newline at end of file diff --git a/samba-editshare-html.lsp b/samba-editshare-html.lsp deleted file mode 100644 index d53d861..0000000 --- a/samba-editshare-html.lsp +++ /dev/null @@ -1,11 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -<H1><%= html.html_escape(form.label) %></H1> -<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - local order = {"name", "valid", "comment", "path", "browseable", "guest", "printable", "writable"} - htmlviewfunctions.displayform(form, order, {"other"}) -%> diff --git a/samba-join-html.lsp b/samba-join-html.lsp deleted file mode 100644 index 8a11d3a..0000000 --- a/samba-join-html.lsp +++ /dev/null @@ -1,16 +0,0 @@ -<% local form, viewlibrary, page_info, session = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -<% if viewlibrary and viewlibrary.dispatch_component then - viewlibrary.dispatch_component("status") -end %> - -<H1><%= html.html_escape(form.label) %></H1> -<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - form.value.password.type = "password" - local order = {"domain", "login", "password"} - htmlviewfunctions.displayform(form, order) -%> 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 |