Author: aschnell Date: Tue Jul 28 11:05:45 2009 New Revision: 58185 URL: http://svn.opensuse.org/viewcvs/yast?rev=58185&view=rev Log: - refactoring Modified: trunk/storage/storage/src/modules/Storage.ycp Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=58185&r1=58184&r2=58185&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Tue Jul 28 11:05:45 2009 @@ -5808,23 +5808,26 @@ return false; } } - else if (size(pw1) < min_length) + else { - // popup text - Popup::Message(sformat(_("The password must have at least %1 characters. + if (size(pw1) < min_length) + { + // popup text + Popup::Message(sformat(_("The password must have at least %1 characters. Try again. "), min_length)); - return false; - } + return false; + } - string allowed_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#* ,.;:._-+!$%&/|\?{[()]}@^\\<>"; - if (!isempty(pw1) && findfirstnotof(pw1, allowed_chars) != nil) - { - // popup text - Popup::Message(_("The password may only contain the following characters: + string allowed_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#* ,.;:._-+!$%&/|\?{[()]}@^\\<>"; + if (findfirstnotof(pw1, allowed_chars) != nil) + { + // popup text + Popup::Message(_("The password may only contain the following characters: 0..9, a..z, A..Z, and any of \"@#* ,.;:._-+!$%&/|\?{[()]}^\\<>\". Try again.")); - return false; + return false; + } } return true; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org