Title: [opsview] [13024] Fixed Safari bug where changing passwords were not validating correctly
- Revision
- 13024
- Author
- tvoon
- Date
- 2013-07-22 15:04:49 +0100 (Mon, 22 Jul 2013)
Log Message
Fixed Safari bug where changing passwords were not validating correctly
Modified Paths
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2013-07-22 13:13:35 UTC (rev 13023)
+++ trunk/CHANGES 2013-07-22 14:04:49 UTC (rev 13024)
@@ -38,6 +38,7 @@
Fixed menu Network outages link only appearing if VIEWALL is granted for user
Fixed status pages where a long host group hierarchy was being hidden from view
Fixed contextual menus on performance style viewport when Opsview Web rebased
+ Fixed Safari bug where changing passwords were not validating correctly
3.20130522
ENHANCEMENTS:
Modified: trunk/opsview-web/root/admin/contact/tab-contact
===================================================================
--- trunk/opsview-web/root/admin/contact/tab-contact 2013-07-22 13:13:35 UTC (rev 13023)
+++ trunk/opsview-web/root/admin/contact/tab-contact 2013-07-22 14:04:49 UTC (rev 13024)
@@ -111,7 +111,7 @@
name => "password2",
size => 20,
maxlength => 20,
- _onchange_ => "compare_passwords(this, document.main_form.password)",
+ _onchange_ => "compare_passwords(document.main_form.password, this)",
hide_value => 1,
);
@@ -123,12 +123,19 @@
alert(password_error);
f1.value="";
f2.value="";
+ f1.addClassName("invalid-passwords"); // We use this to know if the password field has failed this validation
f1.focus(); // This doesn't appear to work when tabbing out - not sure why
+ return false; // Need return false here for Safari, otherwise validation below not called
+ } else {
+ f1.removeClassName("invalid-passwords");
}
}
Event.observe('main_form', 'submit', function(e) {
var thisForm = $('main_form');
- if (thisForm.password) {
+ var p1 = $(thisForm.password);
+ if (p1.hasClassName('invalid-passwords')) {
+ Event.stop(e);
+ } else if (thisForm.password) {
if (isEmpty(thisForm.password) && isEmpty(thisForm.password2)) {
// Need to strip passwords from CGI so not changed to blank
thisForm.password.disabled=true;
_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins