summaryrefslogtreecommitdiffstats
path: root/interfaces-update-html.lsp
blob: 5c33872d547cb88791a3f2f8598ac1680aa9ba7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<? local form = ... 
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>")
--]]
?>

<h1>Update Interface <?= form.value.name.value ?></h1>

<form action="<?= form.option.script .. "/" .. form.option.prefix ..
		form.option.controller .. "/" .. form.option.action ..
		form.option.extra ?>" method="POST">

<DL>
<? 

-- 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't show "name" - since its already known
local tags = { "comment", "method", "address", "netmask", "gateway",
		"hostname", "provider", "pre-up", "up", "down", "post-down", "cmd" }
local myform = form.value 
displayinfo(myform,tags)
-- Add the 'name' filed (but don't show it because it's {type='hidden'}
io.write(html.form[myform.name.type](myform.name))
?>
</DL>

<H2>Other actions</H2>
<DL>
<? 
local tags = { "cmddelete", }
local myform = form.value
displayinfo(myform,tags)
?>
</DL>

</form>