From d62056dfce1a702101a17093e0fcaaea22f5cc09 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 3 Mar 2014 17:01:15 +0000 Subject: Modified password/status HTML view to make better use of htmlviewfunctions and remove custom HTML --- app/acf-util/password-model.lua | 4 ++-- app/acf-util/password-status-html.lsp | 16 ++++++++-------- 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) %> -

User Accounts

-

Create new account

-
- -

-
-

Existing account

-<% 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) %>

<%= name %>

-- cgit v1.2.3