summaryrefslogtreecommitdiffstats
path: root/interfaces-update-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'interfaces-update-html.lsp')
-rw-r--r--interfaces-update-html.lsp38
1 files changed, 5 insertions, 33 deletions
diff --git a/interfaces-update-html.lsp b/interfaces-update-html.lsp
index 5c33872..453afe9 100644
--- a/interfaces-update-html.lsp
+++ b/interfaces-update-html.lsp
@@ -9,37 +9,9 @@ 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)
+<h1><?= form.label ?> - <?= form.value.name.value ?></h1>
+<?
+ form.value.name.contenteditable = false
+ local order = {"name", "comment", "auto", "family", "method", "pre-up", "up", "down", "post-down"}
+ displayform(form, order)
?>
-</DL>
-
-</form>
-