summaryrefslogtreecommitdiffstats
path: root/lbu-config-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-01-23 14:31:44 +0000
committerMika Havela <mika.havela@gmail.com>2008-01-23 14:31:44 +0000
commitb6c2c25e5e99b6d8515a777a00f5a97c1f6b1d23 (patch)
tree8d38ec02518e736922c41961545d8123191641b0 /lbu-config-html.lsp
parent8d5450a1ad2402c0e5b764a5e033cd9134dd4d23 (diff)
downloadacf-alpine-conf-b6c2c25e5e99b6d8515a777a00f5a97c1f6b1d23.tar.bz2
acf-alpine-conf-b6c2c25e5e99b6d8515a777a00f5a97c1f6b1d23.tar.xz
Forcing user to enter valid options in the config-tab before making a commit.
Displaying current errors in the config/settings. git-svn-id: svn://svn.alpinelinux.org/acf/alpine-conf/trunk@628 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lbu-config-html.lsp')
-rw-r--r--lbu-config-html.lsp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lbu-config-html.lsp b/lbu-config-html.lsp
index 76233a7..9d9f872 100644
--- a/lbu-config-html.lsp
+++ b/lbu-config-html.lsp
@@ -14,14 +14,15 @@
<H2>Advanced config</H2>
<H3>Storage media</H3>
<dl>
- <dt>Default media for commit</dt>
+ <dt <? if (view.errors) and (view.errors.LBU_MEDIA) then io.write("class='error'") end ?>>Default media for commit</dt>
<dd><select name="LBU_MEDIA" size="1">
<? for i=1, table.maxn(view.config.LBU_MEDIA_LIST) do ?>
<option value="<?= view.config.LBU_MEDIA_LIST[i]["value"] ?>"
<? if (string.lower(view.config.LBU_MEDIA_LIST[i]["value"]) == string.lower(view.config.LBU_MEDIA or "")) then io.write("selected='selected'") end?>>
<?= view.config.LBU_MEDIA_LIST[i]["name"] ?></option>
<? end ?>
- </select></dd>
+ </select>
+ <p class=error><?= view.errors.LBU_MEDIA or "" ?></p></dd>
</dl>
<H3>Include/exclude list</H3>
@@ -60,8 +61,9 @@
<option value="<?= view.config.DEFAULT_CIPHER_LIST[i] ?>" <? if (string.lower(view.config.DEFAULT_CIPHER_LIST[i]) == string.lower(view.config.DEFAULT_CIPHER)) then io.write("selected='selected'") end?>><?= view.config.DEFAULT_CIPHER_LIST[i] ?></option>
<? end ?>
</select></dd>
- <dt>Password when encrypting</dt>
- <dd><input type="text" class="text" value="<?= view.config.PASSWORD or "" ?>" name="PASSWORD"></dd>
+ <dt <? if (view.errors) and (view.errors.PASSWORD) then io.write("class='error'") end ?>>Password when encrypting</dt>
+ <dd><input type="text" class="text" value="<?= view.config.PASSWORD or "" ?>" name="PASSWORD">
+ <p class=error><?= view.errors.PASSWORD or "" ?></p></dd>
</dl>
<H2>Save and apply above settings</H2>
@@ -79,4 +81,5 @@ io.write(debugs.variables(view))
?>
+
<? -- vim: set filetype=lua : ?>