Add votename to Menu.

Display the current voting's description.
Also purge some dead code.

Picked from upstream.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2014-03-19 21:43:48 +01:00
parent c1cc3954b4
commit 3aca529725
2 changed files with 5 additions and 17 deletions

View file

@ -20,6 +20,9 @@ Version 4.12 (19.01.2014):
Wahlschein und einem Musterwahlschein (wie im CfV geposted) zu starten.
Dazu muss die Config-Option "sampleballotfile" gesetzt und die Datei
vorhanden sein (Standard-Dateiname: ballot.sample)
- im Fehlermenue wird nun der Name der Abstimmung als Ueberschrift
angezeigt. Ausserdem wurde in UVmenu.pm ein redundanter Code-Abschnitt
entfernt
Version 4.11 (25.09.2012):
- Regular Expression fuer Pruefung des Abstimmungsnamens verbessert.

View file

@ -60,6 +60,7 @@ sub menu {
while (1) {
system($config{clearcmd});
print "-> $config{votename} <-\n";
print UVmessage::get("MENU_PROBLEMS") . "\n";
foreach my $error (keys %errors) {
@ -107,7 +108,7 @@ sub menu {
open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}");
print DIFF $$body, "\n";
close (DIFF);
} elsif ($input eq '1') {
system($config{clearcmd});
# ignore SIGPIPE (Bug in more and less)
@ -300,22 +301,6 @@ sub menu {
$errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING");
}
} elsif ($input eq '7') {
my $sel;
do {
print "[a] ", UVmessage::get("MENU_VOTING_CORRECT"), "\n",
"[b] ", UVmessage::get("MENU_VOTING_WRONG"), "\n\n",
UVmessage::get("MENU_PROMPT");
$sel = <STDIN>;
} until ($sel =~ /^[ab]$/i);
if ($sel =~ /^a$/i) {
delete $errors{NoVoting};
delete $errors{WrongVoting};
} else {
$errors{WrongVoting} = UVmessage::get("MENU_WRONGVOTING");
}
} elsif ($input =~ /^i$/i) {
my $ignore = UVmessage::get("MENU_IGNORE_STRING");
# Set columns for Text::Wrap