From bbf03c7084a47fb367b5f42cb6c272b531e61271 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 9 Jun 2010 17:34:03 +0000 Subject: user management: focus on first entry in dialog, root password if superuser is asked, user real name otherwise (#54910) --- perl-install/NEWS | 2 ++ perl-install/any.pm | 6 ++++-- perl-install/install/NEWS | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index 77da8a586..7e9ca3417 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,4 +1,6 @@ - add scrollbar to partitionning wizard if needed +- user management: focus on first entry in dialog, root password if + superuser is asked, user real name otherwise (#54910) Version 13.34 - 5 June 2010 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 }, diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index f6d673314..b341629bc 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- user management: focus on first entry in dialog, root password if + superuser is asked, user real name otherwise (#54910) + Version 13.33 - 4 June 2010 - lookup major:minor of devices outside $::prefix -- cgit v1.2.1