Add votename to Menu.
authorThomas Hochstein <thh@inter.net>
Wed, 19 Mar 2014 20:43:48 +0000 (21:43 +0100)
committerThomas Hochstein <thh@inter.net>
Wed, 19 Mar 2014 20:43:48 +0000 (21:43 +0100)
Display the current voting's description.
Also purge some dead code.

Picked from upstream.

Signed-off-by: Thomas Hochstein <thh@inter.net>
CHANGES
UVmenu.pm

diff --git a/CHANGES b/CHANGES
index 4afa606..f911feb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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.
index 486bb2c..07e32c8 100644 (file)
--- a/UVmenu.pm
+++ b/UVmenu.pm
@@ -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
This page took 0.013067 seconds and 4 git commands to generate.