=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml 2013-06-30 16:51:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml 2013-07-29 07:52:18 +0000 @@ -1,4 +1,3 @@ - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2013-07-25 02:32:32 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2013-07-29 07:52:18 +0000 @@ -359,8 +359,16 @@ reminder.setDateToCompare( datesToCompare.get( i ) ); reminder.setSendTo( sendTo.get( i ) ); reminder.setWhenToSend( whenToSend.get( i ) ); - UserGroup selectedUserGroup = userGroupService.getUserGroup( userGroup.get( i ) ); - reminder.setUserGroup( selectedUserGroup ); + + if ( reminder.getSendTo() == PatientReminder.SEND_TO_USER_GROUP ) + { + UserGroup selectedUserGroup = userGroupService.getUserGroup( userGroup.get( i ) ); + reminder.setUserGroup( selectedUserGroup ); + } + else + { + reminder.setUserGroup( null ); + } patientReminders.add( reminder ); } program.setPatientReminders( patientReminders ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2013-07-26 09:32:25 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2013-07-29 07:52:18 +0000 @@ -294,7 +294,7 @@ + '' + '' + '' - + '' + '' + '' + '' @@ -303,7 +303,7 @@ + '' + '' + '/' - + '' + + '' + '' + '' + program_SMS_reminder_form @@ -329,6 +329,19 @@ + ''; jQuery('#programStageMessage').append( contend ); + showHideUserGroup(); +} + +function showHideUserGroup() +{ + jQuery(".sendTo").each( function( i, item ){ + var numb = i+1; + if( item.value == 5){ + showById( 'tr'+numb ); + } + else + hideById ( 'tr'+numb ); + }); } function removeTemplateMessageForm( rowId ) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-07-25 02:43:43 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-07-29 07:52:18 +0000 @@ -6,7 +6,9 @@ program_SMS_reminder_form +=""; jQuery( document ).ready( function() { - validation( 'updateProgramForm', function( form ){ + showHideUserGroup(); + + validation( 'updateProgramForm', function( form ){ if( duplicate==true) return false; else{ @@ -84,8 +86,17 @@ }); }; }); - checkValueIsExist( "name", "validateProgram.action",{id:getFieldValue('id')} ); + checkValueIsExist( "name", "validateProgram.action",{id:getFieldValue('id')} ); }); + function onchangeUserGroup( id ) + { + var value = document.getElementById( 'sendTo'+id ).value; + hideById( 'tr'+id ); + if ( value == 5) { + showById( 'tr'+id ); + } + }; +

$i18n.getString( "edit_program" )

@@ -334,7 +345,7 @@ - @@ -343,7 +354,7 @@ - +