diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-06-20 16:27:50 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-06-20 16:27:50 +0000 |
commit | 58beff0b8a06fa37ba459d978ed16a93c6a2f55f (patch) | |
tree | 5918bfd53900ed43b9f8ea440dbf56b9ae293e65 | |
parent | 33f1e8722d417463e80f5f0ef1a5915427472393 (diff) | |
download | ds-58beff0b8a06fa37ba459d978ed16a93c6a2f55f.tar.gz ds-58beff0b8a06fa37ba459d978ed16a93c6a2f55f.tar.xz ds-58beff0b8a06fa37ba459d978ed16a93c6a2f55f.zip |
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.
-rw-r--r-- | ldap/admin/src/scripts/Dialog.pm | 7 | ||||
-rw-r--r-- | ldap/admin/src/scripts/DialogManager.pm | 2 | ||||
-rw-r--r-- | ldap/admin/src/scripts/Setup.pm.in | 2 |
3 files changed, 10 insertions, 1 deletions
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 |