Commit 1cdca3b0 authored by Ted Trask's avatar Ted Trask

Removed unneeded views by updating CFE for autoview

parent a7007f76
fetchmail-editentry-html.lsp
\ No newline at end of file
<% 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
if page_info.action == "editentry" then
form.value.remotehost.readonly = true
form.value.method.type = "text"
form.value.method.readonly = true
form.value.remotemailbox.readonly = true
form.value.localdomain.readonly = true
end
local order = { "remotehost", "enabled", "method", "remotemailbox", "remotepassword", "ssl", "localhost", "localmailbox", "localdomain", "envelope" }
htmlviewfunctions.displayform(form, order)
%>
...@@ -522,19 +522,25 @@ function readentries() ...@@ -522,19 +522,25 @@ function readentries()
end end
function readentry(entryname, meth, remotemailbx, localdom) function readentry(entryname, meth, remotemailbx, localdom)
local enabled = cfe({ type="boolean", value=true, label="Enable" }) local enabled = cfe({ type="boolean", value=true, label="Enable", seq=2 })
local method = cfe({ type="select", value="pop3", label="Method", option=methods }) local method = cfe({ type="select", value="pop3", label="Method", option=methods, seq=3 })
local remotehost = cfe({ value=entryname, label="Remote Host" }) local remotehost = cfe({ value=entryname, label="Remote Host", seq=1 })
local remotemailbox = cfe({ label="Remote Mailbox" }) local remotemailbox = cfe({ label="Remote Mailbox", seq=4 })
local remotepassword = cfe({ label="Password" }) local remotepassword = cfe({ label="Password", seq=5 })
local localhost = cfe({ label="Local Host" }) local localhost = cfe({ label="Local Host", seq=7 })
local localmailbox = cfe({ label="Local Mailbox" }) local localmailbox = cfe({ label="Local Mailbox", seq=8 })
local localdomain = cfe({ label="Local Domain" }) local localdomain = cfe({ label="Local Domain", seq=9 })
local ssl = cfe({ type="boolean", value=false, label="SSL Encryption" }) local ssl = cfe({ type="boolean", value=false, label="SSL Encryption", seq=6 })
local envelope = cfe({ type="select", value="X-Envelope-To", label="Envelope Mode", option={"X-Original-To", "Delivered-To", "X-Envelope-To", "Received", "disabled"} }) local envelope = cfe({ type="select", value="X-Envelope-To", label="Envelope Mode", option={"X-Original-To", "Delivered-To", "X-Envelope-To", "Received", "disabled"}, seq=10 })
local entry = findentryline(entryname, meth, remotemailbx, localdom) local entry = findentryline(entryname, meth, remotemailbx, localdom)
if entry then if entry then
remotehost.readonly = true
method.type = "text"
method.readonly = true
remotemailbox.readonly = true
localdomain.readonly = true
if entry[1] == "skip" then if entry[1] == "skip" then
enabled.value = false enabled.value = false
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment