summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2010-06-09 17:34:03 +0000
committerOlivier Blin <oblin@mandriva.com>2010-06-09 17:34:03 +0000
commitbbf03c7084a47fb367b5f42cb6c272b531e61271 (patch)
tree8697eda953cdfaa0c98267ee1da8eaa971fb9fed /perl-install/any.pm
parent4a910dd3e1b11654698e6f933ab7c6260ec08200 (diff)
downloaddrakx-bbf03c7084a47fb367b5f42cb6c272b531e61271.tar
drakx-bbf03c7084a47fb367b5f42cb6c272b531e61271.tar.gz
drakx-bbf03c7084a47fb367b5f42cb6c272b531e61271.tar.bz2
drakx-bbf03c7084a47fb367b5f42cb6c272b531e61271.tar.xz
drakx-bbf03c7084a47fb367b5f42cb6c272b531e61271.zip
user management: focus on first entry in dialog, root password if
superuser is asked, user real name otherwise (#54910)
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 234c74aa7..981195007 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -873,12 +873,12 @@ sub ask_user_and_root {
{ title => N("User management"),
interactive_help_id => 'addUser',
if_($::isInstall && $superuser, cancel => ''),
- focus_first => 1,
}, [
$superuser ? (
{ text => N("Enable guest account"), val => \$xguest, type => 'bool', advanced => 1 },
{ label => N("Set administrator (root) password"), title => 1 },
{ label => N("Password"), val => \$superuser->{password}, hidden => 1, alignment => 'right', weakness_check => 1,
+ focus => sub { 1 },
validate => sub { authentication::check_given_password($in, $superuser, 2 * $security) } },
{ label => N("Password (again)"), val => \$superuser->{password2}, hidden => 1, alignment => 'right' },
) : (),
@@ -890,7 +890,9 @@ sub ask_user_and_root {
{ label => N("Real name"), val => \$u->{realname}, alignment => 'right', focus_out => sub {
$u->{name} ||= lc(Locale::gettext::iconv($u->{realname}, "utf-8", "ascii//TRANSLIT"));
$u->{name} =~ s/[^a-zA-Z0-9_-]//g; # drop any charcter that would break login program
- } },
+ },
+ focus => sub { !$superuser },
+ },
{ label => N("Login name"), val => \$u->{name}, list => \@suggested_names, alignment => 'right',
not_edit => 0, validate => $validate_name },