From 6f7be213b5aefab9ef4fd0073ebc8a1eb4619e4a Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 27 Oct 2012 03:27:52 +0000 Subject: Removed unneeded views by updating CFE for autoview --- provisioning-createclass-html.lsp | 1 - provisioning-createclassgroup-html.lsp | 1 - provisioning-creategroup-html.lsp | 1 - provisioning-createparam-html.lsp | 1 - provisioning-editclass-html.lsp | 14 -------------- provisioning-editclassgroup-html.lsp | 14 -------------- provisioning-editgroup-html.lsp | 14 -------------- provisioning-editoptions-html.lsp | 12 ------------ provisioning-editparam-html.lsp | 7 ------- provisioning-model.lua | 22 +++++++++++++++------- 10 files changed, 15 insertions(+), 72 deletions(-) delete mode 120000 provisioning-createclass-html.lsp delete mode 120000 provisioning-createclassgroup-html.lsp delete mode 120000 provisioning-creategroup-html.lsp delete mode 120000 provisioning-createparam-html.lsp delete mode 100644 provisioning-editclass-html.lsp delete mode 100644 provisioning-editclassgroup-html.lsp delete mode 100644 provisioning-editgroup-html.lsp delete mode 100644 provisioning-editoptions-html.lsp diff --git a/provisioning-createclass-html.lsp b/provisioning-createclass-html.lsp deleted file mode 120000 index ae8c744..0000000 --- a/provisioning-createclass-html.lsp +++ /dev/null @@ -1 +0,0 @@ -provisioning-editclass-html.lsp \ No newline at end of file diff --git a/provisioning-createclassgroup-html.lsp b/provisioning-createclassgroup-html.lsp deleted file mode 120000 index 3751732..0000000 --- a/provisioning-createclassgroup-html.lsp +++ /dev/null @@ -1 +0,0 @@ -provisioning-editclassgroup-html.lsp \ No newline at end of file diff --git a/provisioning-creategroup-html.lsp b/provisioning-creategroup-html.lsp deleted file mode 120000 index efa6903..0000000 --- a/provisioning-creategroup-html.lsp +++ /dev/null @@ -1 +0,0 @@ -provisioning-editgroup-html.lsp \ No newline at end of file diff --git a/provisioning-createparam-html.lsp b/provisioning-createparam-html.lsp deleted file mode 120000 index c936821..0000000 --- a/provisioning-createparam-html.lsp +++ /dev/null @@ -1 +0,0 @@ -provisioning-editparam-html.lsp \ No newline at end of file diff --git a/provisioning-editclass-html.lsp b/provisioning-editclass-html.lsp deleted file mode 100644 index 200cc3e..0000000 --- a/provisioning-editclass-html.lsp +++ /dev/null @@ -1,14 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - if page_info.action == "editclass" then - form.value.class_id.readonly = "true" - else - form.value.class_id.type = "hidden" - end - htmlviewfunctions.displayform(form, nil, nil, page_info, 2) -%> diff --git a/provisioning-editclassgroup-html.lsp b/provisioning-editclassgroup-html.lsp deleted file mode 100644 index 6492755..0000000 --- a/provisioning-editclassgroup-html.lsp +++ /dev/null @@ -1,14 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - if page_info.action == "editclassgroup" then - form.value.class_group_id.readonly = "true" - else - form.value.class_group_id.type = "hidden" - end - htmlviewfunctions.displayform(form, nil, nil, page_info, 2) -%> diff --git a/provisioning-editgroup-html.lsp b/provisioning-editgroup-html.lsp deleted file mode 100644 index 39f58b0..0000000 --- a/provisioning-editgroup-html.lsp +++ /dev/null @@ -1,14 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - if page_info.action == "editgroup" then - form.value.group_id.readonly = "true" - else - form.value.group_id.type = "hidden" - end - htmlviewfunctions.displayform(form, nil, nil, page_info, 2) -%> diff --git a/provisioning-editoptions-html.lsp b/provisioning-editoptions-html.lsp deleted file mode 100644 index 5e386e2..0000000 --- a/provisioning-editoptions-html.lsp +++ /dev/null @@ -1,12 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - form.value.param_id.readonly = "true" - form.value.name.readonly = "true" - form.value.label.readonly = "true" - htmlviewfunctions.displayform(form, nil, nil, page_info, 2) -%> diff --git a/provisioning-editparam-html.lsp b/provisioning-editparam-html.lsp index 731ec1f..d03ed3b 100644 --- a/provisioning-editparam-html.lsp +++ b/provisioning-editparam-html.lsp @@ -5,19 +5,12 @@ html = require("acf.html")

<%= html.html_escape(form.label) %>

<% - if page_info.action == "editparam" then - form.value.param_id.readonly = "true" - else - form.value.param_id.type = "hidden" - end htmlviewfunctions.displayform(form, nil, nil, page_info, 2) %> -<% if page_info.action == "editparam" then %>

Options

-<% end %> diff --git a/provisioning-model.lua b/provisioning-model.lua index 22c8716..8cb1be8 100644 --- a/provisioning-model.lua +++ b/provisioning-model.lua @@ -518,7 +518,7 @@ end get_class_group = function(self, clientdata) local class_group_id = clientdata.class_group_id local retval = {} - retval.class_group_id = cfe({value=class_group_id or "", label="Class Group ID", seq=1}) + retval.class_group_id = cfe({value=class_group_id or "", label="Class Group ID", readonly=true, seq=1}) retval.name = cfe({label="Name", seq=2}) retval.label = cfe({label="Label", seq=3}) retval.seq = cfe({label="Sequence", seq=4}) @@ -535,6 +535,8 @@ get_class_group = function(self, clientdata) end end end + else + retval.class_group_id = nil end if connected then databasedisconnect() end end) @@ -665,7 +667,7 @@ end get_class = function(self, clientdata) local class_id = clientdata.class_id local retval = {} - retval.class_id = cfe({value=class_id or "", label="Class ID", seq=1}) + retval.class_id = cfe({value=class_id or "", label="Class ID", readonly=true, seq=1}) retval.class_group_id = cfe({type="select", label="Class Group", option={}, seq=2}) retval.label = cfe({label="Label", seq=3}) retval.seq = cfe({label="Sequence", seq=4}) @@ -690,6 +692,8 @@ get_class = function(self, clientdata) for i,g in ipairs(tmp) do groups[g.group_id] = true end + else + retval.class_id = nil end -- Get the class_group_id options sql = "SELECT * from provisioning_class_groups ORDER BY seq ASC, label ASC" @@ -852,7 +856,7 @@ end get_group = function(self, clientdata) local group_id = clientdata.group_id local retval = {} - retval.group_id = cfe({value=group_id or "", label="Group ID", seq=1}) + retval.group_id = cfe({value=group_id or "", label="Group ID", readonly=true, seq=1}) retval.name = cfe({label="Name", seq=2}) retval.label = cfe({label="Label", seq=3}) retval.seq = cfe({label="Sequence", seq=4}) @@ -905,6 +909,8 @@ get_group = function(self, clientdata) end end end + else + retval.group_id = nil end if connected then databasedisconnect() end end) @@ -1070,7 +1076,7 @@ end get_param = function(self, clientdata) local param_id = clientdata.param_id local retval = {} - retval.param_id = cfe({value=param_id or "", label="Param ID", seq=1}) + retval.param_id = cfe({value=param_id or "", label="Param ID", readonly=true, seq=1}) retval.name = cfe({label="Name", seq=2}) retval.type = cfe({type="select", label="Type", option={"text", "boolean", "select"}, seq=3}) retval.label = cfe({label="Label", seq=4}) @@ -1092,6 +1098,8 @@ get_param = function(self, clientdata) end end end + else + retval.param_id = nil end if connected then databasedisconnect() end end) @@ -1751,9 +1759,9 @@ end get_param_options = function(self, clientdata) local param_id = clientdata.param_id local retval = {} - retval.param_id = cfe({value=param_id or "", label="Parameter ID", seq=0}) - retval.name = cfe({label="Name", seq=1}) - retval.label = cfe({label="Label", seq=2}) + retval.param_id = cfe({value=param_id or "", label="Parameter ID", readonly=true, seq=0}) + retval.name = cfe({label="Name", readonly=true, seq=1}) + retval.label = cfe({label="Label", readonly=true, seq=2}) retval.options = cfe({type="list", value={}, label="Value Options", descr="Ordered list of options where each option is made up of 'value' or 'value,label'", seq=3}) local errtxt = "Cannot find parameter" if param_id and param_id ~= "" then -- cgit v1.2.3