diff options
author | Natanael Copa <natanael.copa@gmail.com> | 2007-07-27 07:36:59 +0000 |
---|---|---|
committer | Natanael Copa <natanael.copa@gmail.com> | 2007-07-27 07:36:59 +0000 |
commit | 9f1fde7139cb5054a3468984624bbe3d04a5b0eb (patch) | |
tree | 82aebc31beb696adeb7d51d7fce2939133e547ed /interfaces-update-html.lsp | |
parent | cee2c34a5d78a183b777d1d8a716de23ae37331b (diff) | |
download | acf-alpine-baselayout-9f1fde7139cb5054a3468984624bbe3d04a5b0eb.tar.bz2 acf-alpine-baselayout-9f1fde7139cb5054a3468984624bbe3d04a5b0eb.tar.xz |
new style of acf modulesv2.0
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@216 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'interfaces-update-html.lsp')
-rw-r--r-- | interfaces-update-html.lsp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/interfaces-update-html.lsp b/interfaces-update-html.lsp new file mode 100644 index 0000000..ef53642 --- /dev/null +++ b/interfaces-update-html.lsp @@ -0,0 +1,36 @@ +<? local form = ... ?> +<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"> +<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't show "name" - since its already known +local tags = { "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] ?> +<tr><td><? if (val.label) then io.write(val.label) else io.write (v) end ?></td><td> + <? if val.name == "" then + val.name = v + end + + if val.type == "longtext" then + val.cols = 60 + val.rows = 3 + end + + ?> + <?= html.form[val.type](val) ?> +</td></tr> +<? end ?> +</table> +</form> |