------------------------------------------------------------ revno: 14685 committer: samta bajpayee<samta.bajpa...@gmail.com> branch nick: dhis2 timestamp: Sat 2014-04-05 05:26:03 +0100 message: PBF Payment Adjustment modified: local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.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 'local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js' --- local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js 2014-04-02 04:48:04 +0000 +++ local/in/dhis-web-maintenance-pbf/src/main/webapp/dhis-web-maintenance-pbf/javascript/paymentAdjustment.js 2014-04-05 04:26:03 +0000 @@ -10,7 +10,28 @@ function orgUnitHasBeenSelected( orgUnitIds ) { $( '#paymentDiv' ).html( '' ); - + var bValue = false; + for(var i=0;i<=countryTags.length-1;i++) + { + if(countryTags[i] == orgUnitIds[0] ) + { + bValue = true; + } + } + if(bValue == false) + { + disable('dataSetId'); + disable('selectedPeriodId'); + disable('prevButton'); + disable('nextButton'); + + setFieldValue('orgUnitName', orgUnitNames[0] ); + setFieldValue('selectedOrgunitName', orgUnitNames[0] ); + + alert('Please Select Correct OrgUnit'); + } + else + { if( orgUnitIds != null && orgUnitIds != "" ) { var dataSetId = $( '#dataSetId' ).val(); @@ -26,6 +47,7 @@ enable('dataSetId'); var options = ''; + $.each(json.dataSets, function(i, obj){ options += '<option value="' + obj.id + '"'+ '>' + obj.name + '</option>'; }); @@ -50,6 +72,7 @@ } } ); } + } } jQuery(window).load(function() {
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp