From 58beff0b8a06fa37ba459d978ed16a93c6a2f55f Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Wed, 20 Jun 2007 16:27:50 +0000 Subject: Resolves: bug 237356 Description: Move DS Admin Code into Admin Server - navigation Fix Description: Some minor cleanup: 1) Fixed navigation. Now you can go back through several dialogs. 2) Need to create a new Inf even if no file given Platforms tested: RHEL4 Flag Day: No. Doc impact: No. --- ldap/admin/src/scripts/Dialog.pm | 7 +++++++ ldap/admin/src/scripts/DialogManager.pm | 2 +- ldap/admin/src/scripts/Setup.pm.in | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'ldap/admin/src/scripts') diff --git a/ldap/admin/src/scripts/Dialog.pm b/ldap/admin/src/scripts/Dialog.pm index 71fc48a7..e01e6262 100644 --- a/ldap/admin/src/scripts/Dialog.pm +++ b/ldap/admin/src/scripts/Dialog.pm @@ -136,6 +136,7 @@ sub disable { # you can set the 0 to a 1 if the user has chosen to use security sub run { my $self = shift; + my $direction = shift; my $resp = $DialogManager::SAME; # display the dialog text @@ -181,6 +182,12 @@ sub run { } } elsif ($resp == $DialogManager::ERR) { last; + } elsif (!$self->isDisplayed() && ($direction < 0) && + ($resp == $DialogManager::NEXT)) { + # we did not display this dialog, and the current navigation + # direction is BACK, so we should return BACK, to allow + # the user to go back through several dialogs + $resp = $DialogManager::BACK; } } diff --git a/ldap/admin/src/scripts/DialogManager.pm b/ldap/admin/src/scripts/DialogManager.pm index bbf85c9f..27040ed0 100644 --- a/ldap/admin/src/scripts/DialogManager.pm +++ b/ldap/admin/src/scripts/DialogManager.pm @@ -206,7 +206,7 @@ sub run { my $dialog = $self->{dialogs}->[$index]; if ($dialog->isEnabled()) { my $resp = $NEXT; - $resp = $dialog->run(); + $resp = $dialog->run($incr); if ($resp == $BACK) { $incr = -1; } elsif ($resp == $NEXT) { diff --git a/ldap/admin/src/scripts/Setup.pm.in b/ldap/admin/src/scripts/Setup.pm.in index 48ca474e..1aae1a79 100644 --- a/ldap/admin/src/scripts/Setup.pm.in +++ b/ldap/admin/src/scripts/Setup.pm.in @@ -135,6 +135,8 @@ sub new { # if user supplied inf file, use that to initialize if (defined($self->{inffile})) { $self->{inf} = new Inf($self->{inffile}); + } else { + $self->{inf} = new Inf; } my $fh; # create a temp inf file for writing for other processes -- cgit