Confirmation field for password

This commit is contained in:
Jamie Cameron
2010-07-07 10:46:01 -07:00
parent d4215bdcf0
commit be5866971f
4 changed files with 9 additions and 1 deletions
+2
View File
@@ -3,3 +3,5 @@ Converted the UI to use the new Webmin user interface functions, for a more cons
---- Changes since 1.440 ----
If any theme overlays are installed, one can be selected in this module to modify the appearance of the underlying theme.
Converted commands in the module's API file to POD format, and added more details about each function.
---- Changes since 1.510 ----
Added a password confirmation field for password changes.
+2
View File
@@ -16,6 +16,8 @@ if (!defined($oldtheme)) {
# Validate the password
if ($access{'pass'} && &can_change_pass($user) && !$in{'pass_def'}) {
$in{'pass'} =~ /:/ && &error($text{'change_ecolon'});
$in{'pass'} eq $in{'pass2'} ||
&error($text{'change_epass2'});
$perr = &acl::check_password_restrictions(
$user->{'name'}, $in{'pass'});
&error(&text('change_epass', $perr)) if ($perr);
+3 -1
View File
@@ -73,7 +73,9 @@ if ($access{'pass'} && &can_change_pass($user)) {
&ui_radio("pass_def", 1,
[ [ 1, $text{'index_passleave'}."<br>" ],
[ 0, $text{'index_passset'} ] ])." ".
&ui_password("pass", undef, 20));
&ui_password("pass", undef, 20)." ".
$text{'index_passagain'}." ".
&ui_password("pass2", undef, 20));
}
print &ui_table_end();
+2
View File
@@ -10,6 +10,7 @@ index_themeset=Personal choice ..
index_pass=Webmin login password
index_passleave=Leave unchanged
index_passset=Set to ..
index_passagain=Re-enter password
index_ok=Make Changes
index_themedef=Old Webmin Theme
index_desc2=This module can be used to change $1, for your Webmin account only.
@@ -26,6 +27,7 @@ change_done=.. done
change_restart=Reloading Webmin ..
change_redirect=Re-directing to main menu ..
change_ecolon=Your password cannot contain the : character
change_epass2=New passwords do not match
change_epass=New password is not valid : $1
change_eoverlay=You cannot select a theme overlay unless a UI theme is also chosen
change_eoverlay2=The selected theme overlay is not compatible with the chosen UI theme