dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07022
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1968: update jquery validation js
------------------------------------------------------------
revno: 1968
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Wed 2010-08-25 17:38:56 +0700
message:
update jquery validation js
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.validate.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.validate.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.validate.js 2010-08-17 09:20:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.validate.js 2010-08-25 10:38:56 +0000
@@ -928,7 +928,7 @@
data: data,
success: function(response) {
validator.settings.messages[element.name].remote = previous.originalMessage;
- var valid = response === true;
+ var valid = response.response === 'success';
if ( valid ) {
var submitted = validator.formSubmitted;
validator.prepareElement(element);
@@ -937,7 +937,7 @@
validator.showErrors();
} else {
var errors = {};
- var message = (previous.message = response || validator.defaultMessage( element, "remote" ));
+ var message = (previous.message = response.message || validator.defaultMessage( element, "remote" ));
errors[element.name] = $.isFunction(message) ? message(value) : message;
validator.showErrors(errors);
}