unified form header

persistent user-specific language setting fixed
This commit is contained in:
lars 2005-09-21 02:26:31 +00:00
parent 58a574ac84
commit b969e59157
7 changed files with 23 additions and 17 deletions

View file

@ -133,10 +133,6 @@ function create_crypto()
# Parameter: device
{
local device="$1"
# flood the crypto partition with noise
# TODO: do we need "wipe"?
#$WIPE -kq -R /dev/urandom "${device}2"
# passphrase may be passed via command line
$CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2"
}
@ -145,6 +141,13 @@ function create_crypto()
function mkfs_crypto()
# split from create_crypto to allow background execution via web interface
{
local device=$(find_harddisk)
# flood the crypto partition with noise
# writing to the real partition is faster
# TODO: this takes _much_ too long - maybe add a "secure wipe" switch to the interface?
#dd if=/dev/urandom of="${device}2" bs=512
$MKFS_DATA "$CRYPTMAPPER_DEV"
}

View file

@ -1,9 +1,7 @@
<div id="config">
<h1><?cs var:Lang.Title.Config ?></h1>
<form action="<?cs call:getSelfURL('','') ?>" method="post"
enctype="application/x-www-form-urlencoded">
<?cs call:print_form_header() ?>
<?cs if:Data.Config.AdminPasswordIsSet ?>
<p><label for="current_admin_password"><?cs call:help_popUp(Lang.Text.EnterCurrentAdminPassword,"prove_admin_pw") ?></label><br/>
<input type="password" id="current_admin_password" name="current_admin_password" size="20" tabindex="1" maxlength="40" /> </p>

View file

@ -1,7 +1,7 @@
<h1><?cs var:Lang.Title.Init ?></h1>
<div class="init">
<form action="<?cs call:getSelfURL('','') ?>" method="post" enctype="application/x-www-form-urlencoded">
<?cs call:print_form_header() ?>
<p class="note"><?cs var:Lang.Text.InitWarning ?></p>
<?cs if:Data.Config.AdminPasswordIsSet ?>

View file

@ -62,7 +62,7 @@
set:tmp_concat='&' ?><?cs
/if ?><?cs
/each ?><?cs
if:?append ?><?cs set:PostSuffix=PostSuffix + tmp_concat + append ?><?cs
if:(append != '') ?><?cs set:PostSuffix=PostSuffix + tmp_concat + append ?><?cs
/if ?><?cs
var:ScriptName ?><?cs var:PostSuffix ?><?cs
/def ?>
@ -77,7 +77,15 @@
/def ?>
<?cs def:help_popUp(text,filename) ?><?cs
var:text ?><?cs
<?cs def:help_popUp(text,filename) ?><?cs #
# TODO: remove this, if on-screen help will die :)
?><?cs var:text ?><?cs
/def ?>
<?cs def:print_form_header() ?><?cs #
# the header of a form - including Data.PostData values as hidden fields
?><form action="<?cs var:ScriptName ?>" method="post" enctype="application/x-www-form-urlencoded">
<?cs each:item = Data.PostData
?><input type="hidden" name="<?cs name:item ?>" value="<?cs var:item ?>" /><?cs
/each ?><?cs
/def ?>

View file

@ -1,8 +1,7 @@
<h1><?cs var:Lang.Title.Mount ?></h1>
<div align="center">
<form action="<?cs call:getSelfURL('','') ?>" method="post"
enctype="application/x-www-form-urlencoded">
<?cs call:print_form_header() ?>
<p><label for="crypto_passwort"><?cs var:Lang.Text.EnterCurrentCryptoPassword ?></label>
<input type="password" id="crypto_password" name="crypto_password" size="20" tabindex="0" maxlength="40" /></p>

View file

@ -1,8 +1,7 @@
<h1><?cs var:Lang.Title.ShutDown ?></h1>
<div align="center">
<form action="<?cs call:getSelfURL('','') ?>" method="post"
enctype="application/x-www-form-urlencoded">
<?cs call:print_form_header ?>
<input type="hidden" name="action" value="shutdown_do" />

View file

@ -1,8 +1,7 @@
<h1><?cs var:Lang.Title.Umount ?></h1>
<div align="center">
<form action="<?cs call:getSelfURL('','') ?>" method="post"
enctype="application/x-www-form-urlencoded">
<?cs call:print_form_header() ?>
<button type="submit" name="action"
value="umount_do"><?cs var:Lang.Button.Umount ?></button>