diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-14 17:33:32 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-14 17:33:32 +0000 |
commit | 37fba9470218838f651b43cf24eceb3f389b35cd (patch) | |
tree | 21d44dcbae52cdb77c7d45a2841d94a757a527d4 | |
parent | 019cb1eddd62d43192b8ee4bb1afc1d8ec2b2ab4 (diff) | |
download | drakx-37fba9470218838f651b43cf24eceb3f389b35cd.tar drakx-37fba9470218838f651b43cf24eceb3f389b35cd.tar.gz drakx-37fba9470218838f651b43cf24eceb3f389b35cd.tar.bz2 drakx-37fba9470218838f651b43cf24eceb3f389b35cd.tar.xz drakx-37fba9470218838f651b43cf24eceb3f389b35cd.zip |
(process) in yes/no case, keep the same logic as
interactive->ask_yesorno() and pass 1 if /yes/ and undef else
-rw-r--r-- | perl-install/wizards.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/wizards.pm b/perl-install/wizards.pm index 04a74565d..9f0ea066a 100644 --- a/perl-install/wizards.pm +++ b/perl-install/wizards.pm @@ -153,19 +153,20 @@ sub process { } my $name = ref($page->{name}) ? $page->{name}->() : $page->{name}; my %yesno = (yes => N("Yes"), no => N("No")); - @data2 = [ { val => \$yes, type => 'list', list => [ values %yesno ] } ] if $page->{type} eq "yesorno"; + my $yes; + $data2 = [ { val => \$yes, type => 'list', list => [ values %yesno ] } ] if $page->{type} eq "yesorno"; my $a = $in->ask_from_({ title => $o->{name}, messages => $name, callbacks => { map { $_ => $page->{$_} || $default_callback{$_} } qw(focus_out complete) }, if_($page->{interactive_help_id}, interactive_help_id => $page->{interactive_help_id}), }, $data2); # interactive->ask_yesorno does not support stepping forward or backward: - $a = $a eq $yesno{yes} if $page->{type} eq "yesorno"; + $a = $yes if $a && $page->{type} eq "yesorno"; if ($a) { # step forward: push @steps, $next if !$page->{ignore} && $steps[-1] ne $next; my $current = $next; - $next = defined $page->{post} ? $page->{post}($a) : 0; + $next = defined $page->{post} ? $page->{post}($page->{type} eq "yesorno" ? $yes eq $yesno{yes} : $a) : 0; return if $page->{end}; if (!$next) { if (!defined $o->{pages}{$next}) { |