diff options
Diffstat (limited to 'ldap_wizard/Ldap.pm')
-rw-r--r-- | ldap_wizard/Ldap.pm | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm index 318ff3f6..32db9dd0 100644 --- a/ldap_wizard/Ldap.pm +++ b/ldap_wizard/Ldap.pm @@ -187,7 +187,7 @@ $o->{pages} = { { label => N("Create in:"), type => 'field', fixed_val => \$o->{var}{defou} }, #. \$o->{var}{suffix} }, ], post => \&do_it_user_add, - next => 'endadd' + next => $o->{var}{useraddisnogood} }, summary_set_srv => { name => N("Confirmation Information for create an LDAP server"), @@ -207,15 +207,26 @@ $o->{pages} = { end => 1, next => 0 }, - endadd => { + + add_user_good => { name => N("Successfully added User"), - data => [ { label => N(""),fixed_val => \$o->{var}{error_user_add} } - - ], - no_back => 1, + data => [ { label => N("\n"),fixed_val => \$o->{var}{error_user_add} } + ], + next => 'add_userposix', end => 1, - next => 0, }, + + add_user_nogood => { + name => N("Error for added User"), + data => [ { label => N("\n"),fixed_val => \$o->{var}{error_user_add} } + ], + next => 'add_userposix', + end => 1, + }, + + + + resume => { name => N("Server already configured"), post => sub { @@ -341,9 +352,16 @@ RootLdif sub do_it_user_add { return if $::testing; - $o->{var}{error_user_add}= add_user($o); -} + ($o->{var}{code_return}, $o->{var}{error_user_add}) = add_user($o); + if ($o->{var}{code_return} =~ /success/i) { + $o->{var}{useraddisnogood} = "add_user_good"; + } else { + $o->{var}{useraddisnogood} = "add_user_nogood"; + } + +} + sub sav_conf { my $cmd = "slapcat -l /root/ldap-sav.ldiff"; system($cmd) == 0 or !$::testing and err_dialog(N("Error!"), N("%s Failed", $cmd)); |