[yast-commit] <web-client> master : improved password validation
ref: refs/heads/master commit f1a389a3675422075bf8f03b829bbc282d33151a Author: Ladislav Slezak <lslezak@novell.com> Date: Fri Nov 20 12:41:50 2009 +0100 improved password validation revalidate the form also if the "Password" field is changed, display the progess icon only when the form is valid at sumbit (bnc#557185) - 0.0.11 --- .../app/views/mail_settings/index.html.erb | 10 ++++++---- .../package/yast2-webclient-mailsettings.changes | 8 ++++++++ .../package/yast2-webclient-mailsettings.spec | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/plugins/mail_settings/app/views/mail_settings/index.html.erb b/plugins/mail_settings/app/views/mail_settings/index.html.erb index 6fbcb0b..b5f5200 100644 --- a/plugins/mail_settings/app/views/mail_settings/index.html.erb +++ b/plugins/mail_settings/app/views/mail_settings/index.html.erb @@ -25,7 +25,9 @@ }); }); - </script> + // start password validation workaround only when "Save" button has been pressed + password_validation_enabled = false; +</script> <script type="text/javascript"> $(document).ready(function(){ @@ -40,7 +42,7 @@ <% disabled = ! @permissions[:write] %> - <% form_for(:mail_settings, @mail_settings, :url => { :action => "update" }, :html => { :method => :put, :id => "mailForm", :autocomplete => :off } ) do |f| %> + <% form_for(:mail_settings, @mail_settings, :url => { :action => "update" }, :html => { :method => :put, :id => "mailForm", :autocomplete => :off, :onsubmit => "if ($('#mailForm').valid()) $('#progress').show()" } ) do |f| %> <%= f.error_messages %> <fieldset class="grid_12"> <p> @@ -54,14 +56,14 @@ <%= f.text_field :user, :disabled => disabled %></p> <p> <label><%=_("Password")%></label> - <%= f.password_field :password, :disabled => disabled %></p> + <%= f.password_field :password, :disabled => disabled, :onkeyup => "if (password_validation_enabled) $('#mailForm').validate().element('#mail_settings_confirm_password')" %></p> <p> <label><%=_("Confirm password")%></label> <%= f.password_field :confirm_password, :disabled => disabled, :equalTo => "#mail_settings_password" %> </p> </fieldset> <p> - <%= form_send_buttons :onclick=>"$('#progress').show()", :disabled => disabled %> + <%= form_send_buttons :onclick=>"password_validation_enabled = true", :disabled => disabled %> </p> <% end %> </div> diff --git a/plugins/mail_settings/package/yast2-webclient-mailsettings.changes b/plugins/mail_settings/package/yast2-webclient-mailsettings.changes index 9cdbced..2e6b738 100644 --- a/plugins/mail_settings/package/yast2-webclient-mailsettings.changes +++ b/plugins/mail_settings/package/yast2-webclient-mailsettings.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Fri Nov 20 12:26:44 CET 2009 - lslezak@suse.cz + +- improved password validation - revalidate the form also if + the "Password" field is changed, display the progess icon + only when the form is valid at sumbit (bnc#557185) +- 0.0.11 + +------------------------------------------------------------------- Thu Nov 12 09:30:01 CET 2009 - jsuchome@suse.cz - disable Firefox autocomplete in the form (bnc#554707) diff --git a/plugins/mail_settings/package/yast2-webclient-mailsettings.spec b/plugins/mail_settings/package/yast2-webclient-mailsettings.spec index adf76dc..141faf7 100644 --- a/plugins/mail_settings/package/yast2-webclient-mailsettings.spec +++ b/plugins/mail_settings/package/yast2-webclient-mailsettings.spec @@ -14,7 +14,7 @@ PreReq: yast2-webclient >= 0.0.2 License: GPL v2 only Group: Productivity/Networking/Web/Utilities Autoreqprov: on -Version: 0.0.10 +Version: 0.0.11 Release: 0 Summary: YaST2 - Webclient - Mail Settings Source: www.tar.bz2 -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Ladislav Slezak