empty setting handling fixed (closes #21)

gnupg key generation page added
This commit is contained in:
lars 2006-04-09 20:52:35 +00:00
parent 1a6839cd63
commit bda51b0100
12 changed files with 42 additions and 21 deletions

View file

@ -341,6 +341,7 @@ sub load_hdf {
# "normal", "basic" and "expert" should be supported
# TODO: should be selected via web interface
$ui_template = "normal";
$ui_set = "default"; # may be overwritten later
$hdf->setValue("Config.UI.LinkAttrs.web_lang", $HTML_LANGUAGE);
$hdf->setValue("Config.UI.LinkAttrs.template", $ui_template);
@ -355,9 +356,10 @@ sub load_hdf {
sub output_page {
# Print the page
&fatal_error("UI template file not found")
unless (-e "$TEMPLATE_DIR/ui/$ui_set/${ui_template}.hdf");
$pagedata->readFile("$TEMPLATE_DIR/ui/$ui_set/${ui_template}.hdf");
my $ui_template_file = "$TEMPLATE_DIR/ui/$ui_set/${ui_template}.hdf";
&fatal_error("UI template file ($ui_template_file) not found")
unless (-e $ui_template_file);
$pagedata->readFile($ui_template_file);
$pagedata->setValue('Data.Success', "$success") if (defined($success));
$pagedata->setValue('Data.Error', "$error") if (defined($error));
@ -1186,7 +1188,10 @@ sub extract_options_from_params()
if (defined($q->param("setting_state_$i"))) {
$options .= " -$i '" . $q->param("setting_value_$i") . "'";
} else {
$options .= " -$i ''";
# do not set the value to an empty string,
# as ezmlm-idx 5.0 does not work correctly for this case
# just skip this setting - this works for 0.4x and 5.0
#$options .= " -$i ''";
}
} else {
# import the previous setting

View file

@ -67,6 +67,7 @@ Lang {
DeletePublicKey = Öffentliche(n) Schlüssel lälschen
DeleteSecretKey = Private(n) Schlüssel lälschen
GnupgImportKey = Schlüssel importieren
GnupgGenerateKey = Schlüsselpaar erzeugen
}

View file

@ -67,6 +67,7 @@ Lang {
DeletePublicKey = Delete public key(s)
DeleteSecretKey = Delete secret key(s)
GnupgImportKey = Import key
GnupgGenerateKey = Generate key pair
}

View file

@ -0,0 +1,19 @@
<div class="title">
<h1><?cs var:html_escape(Lang.Title.GnupgGenerateKey) ?></h1>
</div>
<fieldset class="form">
<legend><?cs var:html_escape(Lang.Legend.GnupgGenerateKey) ?> </legend>
<form method="post" action="<?cs call:link("","","","","","") ?>" enctype="application/x-www-form-urlencoded">
<?cs call:show_options(UI.Options.GenerateKey) ?>
<!-- include default form values -->
<?cs include:TemplateDir + '/form_common.cs' ?>
<input type="hidden" name="action" value="gnupg_generate_key" />
<button type="submit" name="send" value="do"><?cs var:html_escape(Lang.Buttons.GnupgGenerateKey) ?></button>
</form>
</fieldset>

View file

@ -132,7 +132,7 @@
?><li><a <?cs if:(Data.Action == "gnupg_generate")
?> class="nav_active"<?cs /if ?>
href="<?cs call:link("list",Data.List.Name,"action","gnupg_ask",
"gnupg_subset","generate") ?>"
"gnupg_subset","generate_key") ?>"
title="<?cs var:html_escape(Lang.Menue.GnupgGenerateKey) ?>"><?cs
var:html_escape(Lang.Menue.GnupgGenerateKey) ?></a></li><?cs /if ?>
</ul></li><?cs /if ?>

View file

@ -26,13 +26,11 @@ UI {
Options {
Create {
# TODO: was soll hier ein?
Listname = create_listname
Listaddress = create_listaddress
Listlanguage = lang_select
Mysql = mysql
Webuser = webusers
GenerateKey {
KeyName = gnupg_keyname
KeyComment = gnupg_keycomment
KeySize = gnupg_keysize
KeyType = gnupg_keytype
}
@ -40,18 +38,15 @@ UI {
Main {
#Language = lang_select
#Charset = charset_select
SignMessages = gpg_sign_messages
EncryptToAll = gpg_encrypt_to_all
AllowKeySubmission = gpg_allow_key_submission
NokeyNocrypt = gpg_nokey_nocrypt
VerifiedKeyReq = gpg_verified_key_required
RequireSub = gpg_require_subscriber
SignMessages = gnupg_sign_messages
EncryptToAll = gnupg_encrypt_to_all
AllowKeySubmission = gnupg_allow_key_submission
NokeyNocrypt = gnupg_nokey_nocrypt
VerifiedKeyReq = gnupg_verified_key_required
RequireSub = gnupg_require_subscriber
WebUsers = webusers
}
Gnupg {
}
}
}