summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-06 12:34:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-06 12:34:49 +0000
commitc26267fdbe8196da11186f0bda1ef7a013700411 (patch)
treedd475b62a5f0d5a49c90ff70adee7e940e9182b7 /perl-install/any.pm
parent237f1302694d779a96b0fd9f3b7dbe82fc6e05d1 (diff)
downloaddrakx-c26267fdbe8196da11186f0bda1ef7a013700411.tar
drakx-c26267fdbe8196da11186f0bda1ef7a013700411.tar.gz
drakx-c26267fdbe8196da11186f0bda1ef7a013700411.tar.bz2
drakx-c26267fdbe8196da11186f0bda1ef7a013700411.tar.xz
drakx-c26267fdbe8196da11186f0bda1ef7a013700411.zip
(ask_users): focus the "name" field, and change the buttons name & place
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 60bca91ec..ebc8c5973 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -543,16 +543,18 @@ sub ask_users {
my $ret = $in->ask_from_(
{ title => N("Add user"),
messages => N("Enter a user\n%s", $names),
- ok => N("Accept user"),
- cancel => $security < 4 || @$users ? N("Done") : '',
+ focus_first => 1,
+ if_(!$::isInstall, ok => N("Done")),
+ cancel => N("Accept user"),
callbacks => {
focus_out => sub {
if ($_[0] eq 0) {
$u->{name} ||= lc first($u->{realname} =~ /([\w-]+)/);
}
},
- complete => $verif,
- canceled => sub { $u->{name} ? &$verif : 0 },
+ complete => sub { $u->{name} ? &$verif : 0 },
+ canceled => $verif,
+ ok_disabled => sub { $security >= 4 && !@$users },
} }, [
{ label => N("Real name"), val => \$u->{realname} },
{ label => N("User name"), val => \$u->{name} },
@@ -573,7 +575,7 @@ sub ask_users {
push @$users, $u if $u->{name};
$u = {};
- $ret or return;
+ $ret and return;
}
}