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 # "normal", "basic" and "expert" should be supported
# TODO: should be selected via web interface # TODO: should be selected via web interface
$ui_template = "normal"; $ui_template = "normal";
$ui_set = "default"; # may be overwritten later
$hdf->setValue("Config.UI.LinkAttrs.web_lang", $HTML_LANGUAGE); $hdf->setValue("Config.UI.LinkAttrs.web_lang", $HTML_LANGUAGE);
$hdf->setValue("Config.UI.LinkAttrs.template", $ui_template); $hdf->setValue("Config.UI.LinkAttrs.template", $ui_template);
@ -355,9 +356,10 @@ sub load_hdf {
sub output_page { sub output_page {
# Print the page # Print the page
&fatal_error("UI template file not found") my $ui_template_file = "$TEMPLATE_DIR/ui/$ui_set/${ui_template}.hdf";
unless (-e "$TEMPLATE_DIR/ui/$ui_set/${ui_template}.hdf"); &fatal_error("UI template file ($ui_template_file) not found")
$pagedata->readFile("$TEMPLATE_DIR/ui/$ui_set/${ui_template}.hdf"); unless (-e $ui_template_file);
$pagedata->readFile($ui_template_file);
$pagedata->setValue('Data.Success', "$success") if (defined($success)); $pagedata->setValue('Data.Success', "$success") if (defined($success));
$pagedata->setValue('Data.Error', "$error") if (defined($error)); $pagedata->setValue('Data.Error', "$error") if (defined($error));
@ -1186,7 +1188,10 @@ sub extract_options_from_params()
if (defined($q->param("setting_state_$i"))) { if (defined($q->param("setting_state_$i"))) {
$options .= " -$i '" . $q->param("setting_value_$i") . "'"; $options .= " -$i '" . $q->param("setting_value_$i") . "'";
} else { } 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 { } else {
# import the previous setting # import the previous setting

View file

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

View file

@ -67,6 +67,7 @@ Lang {
DeletePublicKey = Delete public key(s) DeletePublicKey = Delete public key(s)
DeleteSecretKey = Delete secret key(s) DeleteSecretKey = Delete secret key(s)
GnupgImportKey = Import key 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") ?><li><a <?cs if:(Data.Action == "gnupg_generate")
?> class="nav_active"<?cs /if ?> ?> class="nav_active"<?cs /if ?>
href="<?cs call:link("list",Data.List.Name,"action","gnupg_ask", 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 title="<?cs var:html_escape(Lang.Menue.GnupgGenerateKey) ?>"><?cs
var:html_escape(Lang.Menue.GnupgGenerateKey) ?></a></li><?cs /if ?> var:html_escape(Lang.Menue.GnupgGenerateKey) ?></a></li><?cs /if ?>
</ul></li><?cs /if ?> </ul></li><?cs /if ?>

View file

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