dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15516
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5643: Fixed bug: Data mart - Validation restrictions while creating or updating datamart export
------------------------------------------------------------
revno: 5643
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-12-30 14:17:59 +0700
message:
Fixed bug: Data mart - Validation restrictions while creating or updating datamart export
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm
--
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/i18n/messages.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm 2011-09-19 07:44:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/messages.vm 2011-12-30 07:17:59 +0000
@@ -62,6 +62,7 @@
,strippedminlength : '$encoder.jsEscape($i18n.getString( 'please_enter_at_least_n_character' ) , "'")'
,datelessthanequaltoday: '$encoder.jsEscape($i18n.getString( 'this_date_can_not_be_after_today' ) , "'")'
,required_group : '$encoder.jsEscape($i18n.getString( 'please_fill_out_at_least_one_of_these_fields' ) , "'")'
+ ,required_select_group : '$encoder.jsEscape($i18n.getString( 'please_select_at_least_one_option_for_these_fields' ) , "'")'
,password: '$encoder.jsEscape($i18n.getString( 'password_must_contain_at_least_one_capital_letter_and_one_digit' ) , "'")'
,notOnlyDigits: '$encoder.jsEscape($i18n.getString('only_digits_are_not_allowed' ) , "'")'
,custome_regex: validatorFormat("{1}")
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js 2011-09-20 14:48:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js 2011-12-30 07:17:59 +0000
@@ -327,6 +327,10 @@
return $("input.required_group:filled").length;
}, "Please fill out at least one of these fields.");
+jQuery.validator.addMethod("required_select_group", function(value, element) {
+ return $("select.required_select_group option").length;
+}, "Please select at least one option for these fields.");
+
jQuery.validator.addMethod("date", function(value, element, param) {
return this.optional(element) || getDateFromFormat(value,param);
});
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2011-12-14 08:10:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2011-12-30 07:17:59 +0000
@@ -370,6 +370,7 @@
please_enter_at_least_n_character=Please enter at least {0} characters.
this_date_can_not_be_after_today=This date can not be after today.
please_fill_out_at_least_one_of_these_fields=Please fill out at least one of these fields.
+please_select_at_least_one_option_for_these_fields=Please select at least one option for these fields.
password_must_contain_at_least_one_capital_letter_and_one_digit=Password must contain at least one capital letter and one digit.
only_digits_are_not_allowed=Only digits are not allowed
closedDate_should_be_greater_than_openDate=The ClosedDate field should be greater than the OpenDate field.
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm 2011-10-04 05:10:07 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm 2011-12-30 07:17:59 +0000
@@ -45,7 +45,7 @@
<th>$i18n.getString( "available_dataelements" )</th>
<td></td>
<th>$i18n.getString( "selected_dataelements" )
- <select id="dataelementsValidator" class="{validate:{required:true}}" style="display:none"/>
+ <select id="dataelementsValidator" class="required_select_group {validate:{required_select_group:true}}" style="display:none"/>
</th>
</tr>
<tr>
@@ -76,7 +76,7 @@
<th>$i18n.getString( "available_indicators" )</th>
<td></td>
<th>$i18n.getString( "selected_indicators" )
- <select id="indicatorsValidator" class="{validate:{required:true}}" style="display:none"/>
+ <select id="indicatorsValidator" class="required_select_group {validate:{required_select_group:true}}" style="display:none"/>
</th>
</tr>
<tr>