summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-03-03 17:01:15 +0000
committerTed Trask <ttrask01@yahoo.com>2014-03-03 17:01:15 +0000
commitd62056dfce1a702101a17093e0fcaaea22f5cc09 (patch)
treeca58fb8bb276c16e6e8d87b1368846eeeac790e9 /app
parent93c77ea98511b60546ae7af451597c97da9aef97 (diff)
downloadacf-core-d62056dfce1a702101a17093e0fcaaea22f5cc09.tar.bz2
acf-core-d62056dfce1a702101a17093e0fcaaea22f5cc09.tar.xz
Modified password/status HTML view to make better use of htmlviewfunctions and remove custom HTML
Diffstat (limited to 'app')
-rw-r--r--app/acf-util/password-model.lua4
-rw-r--r--app/acf-util/password-status-html.lsp16
2 files changed, 10 insertions, 10 deletions
diff --git a/app/acf-util/password-model.lua b/app/acf-util/password-model.lua
index 3a61983..5a389a8 100644
--- a/app/acf-util/password-model.lua
+++ b/app/acf-util/password-model.lua
@@ -148,7 +148,7 @@ function mymodule.read_user(self, user)
result.skin = cfe({ type="select", value=userinfo.skin or "", label="Skin", option=avail_skins or {""}, seq=7 })
result.home = cfe({ type="select", value=userinfo.home or "", label="Home", option=avail_homes or {""}, seq=6 })
- return cfe({ type="group", value=result, label="User Config" })
+ return cfe({ type="group", value=result, label="User Account" })
end
function mymodule.get_users(self)
@@ -161,7 +161,7 @@ function mymodule.get_users(self)
users[#users+1] = mymodule.read_user(self, user)
end
- return cfe({ type="group", value=users, label="User Configs" })
+ return cfe({ type="group", value=users, label="User Accounts" })
end
function mymodule.get_delete_user(self, clientdata)
diff --git a/app/acf-util/password-status-html.lsp b/app/acf-util/password-status-html.lsp
index 9316bda..189cc63 100644
--- a/app/acf-util/password-status-html.lsp
+++ b/app/acf-util/password-status-html.lsp
@@ -4,14 +4,14 @@
<% htmlviewfunctions.displaycommandresults({"newuser", "edituser", "deleteuser"}, session) %>
-<h1>User Accounts</h1>
-<h2>Create new account</h2>
-<form action="<%= page_info.script .. page_info.prefix .. page_info.controller %>/newuser" method="post">
-<input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action) %>" >
-<div class='item'><p class='left'></p><div class='right'><input class="submit" type="submit" value="Create"></div></div><!-- end .item -->
-</form>
-<h2>Existing account</h2>
-<% for i,user in ipairs(form.value) do
+<%
+local header_level = htmlviewfunctions.displayheader(form, page_info)
+local newaccount = cfe({ type="link", value={}, label="Create New Account", option="Create", action=page_info.script..page_info.prefix..page_info.controller.."/newuser" })
+newaccount.value.redir = cfe({ type="hidden", value=page_info.orig_action })
+htmlviewfunctions.displayitem(newaccount, htmlviewfunctions.incrementheader(header_level), page_info)
+
+htmlviewfunctions.displayheader(cfe({label="Existing Accounts"}), page_info, htmlviewfunctions.incrementheader(header_level))
+for i,user in ipairs(form.value) do
local name = html.html_escape(user.value.userid.value) %>
<div class='item'><p class='left'><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/apps/system-users.png' height='16' width='16'> <%= name %></p>
<div class='right'>