summaryrefslogtreecommitdiffstats
path: root/interfaces-create-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-05-30 18:37:19 +0000
committerTed Trask <ttrask01@yahoo.com>2008-05-30 18:37:19 +0000
commita280c3b1faa2847b6d4f850a55d0cd4ea8453283 (patch)
tree762cd65291ba792b83e462f746e41b7381bb9d66 /interfaces-create-html.lsp
parent6c63347a6ae2f25de2bf8cf9aea93ea31a786418 (diff)
downloadacf-alpine-baselayout-a280c3b1faa2847b6d4f850a55d0cd4ea8453283.tar.bz2
acf-alpine-baselayout-a280c3b1faa2847b6d4f850a55d0cd4ea8453283.tar.xz
Updated interfaces to use new cfe model, add more iface families, add more flexibility to editing, show ip status, bring up/down interfaces, and general cleanup.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1191 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'interfaces-create-html.lsp')
-rw-r--r--interfaces-create-html.lsp49
1 files changed, 14 insertions, 35 deletions
diff --git a/interfaces-create-html.lsp b/interfaces-create-html.lsp
index 169cc76..5ce1d0f 100644
--- a/interfaces-create-html.lsp
+++ b/interfaces-create-html.lsp
@@ -1,37 +1,16 @@
<? local form = ...
- require ("html") ?>
-<h1>Create Interface</h1>
+require("viewfunctions")
+?>
+<?
+--[[ DEBUG INFORMATION
+io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
+io.write(html.cfe_unpack(form))
+io.write("</span>")
+--]]
+?>
-<form action="<?= form.option.script .. "/" .. form.option.prefix ..
- form.option.controller .. "/" .. form.option.action ..
- form.option.extra ?>" method="POST">
-<table>
-
-<? local myform = form.value
-
--- We redefine the list of tags from the model (iface_tags) because
--- the VIEW can choose the order to display the data. The Controller
--- does not care what order the data is presented.
-
--- In this case, we don do show "name"
-local tags = { "name", "comment", "method", "address", "netmask", "gateway",
- "hostname", "provider", "pre-up", "up", "down", "post-down", "cmd" }
-
-for i,v in pairs(tags) do
- local val = myform[v] ?>
-<dt><? if (val.label) then io.write(val.label) else io.write (v) end ?></dt>
- <? if val.name == "" then
- val.name = v
- end
-
- if val.type == "longtext" then
- val.cols = 60
- val.rows = 3
- end
-
- ?>
- <dd><?= html.form[val.type](val) ?></dd>
-</td></tr>
-<? end ?>
-</table>
-</form>
+<h1><?= form.label ?></h1>
+<?
+ local order = {"name", "comment", "auto", "family", "method", "pre-up", "up", "down", "post-down"}
+ displayform(form, order)
+?>