dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23627
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11509: Fix bug - Exception thrown when clicking Add more template reminder message button in Add program...
------------------------------------------------------------
revno: 11509
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-07-25 09:43:43 +0700
message:
Fix bug - Exception thrown when clicking Add more template reminder message button in Add program form.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.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-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-07-16 04:31:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-07-25 02:43:43 +0000
@@ -1,7 +1,13 @@
<script>
-jQuery( document ).ready( function()
-{
- validation( 'addProgramForm', function( form ){
+ var program_SMS_reminder_form ="<select type='text' id='userGroup$index' name='userGroup$index' class='userGroup'>";
+ #foreach( $group in $userGroups )
+ program_SMS_reminder_form += "<option value='$group.id'>$i18n.getString($group.name)</option>";
+ #end
+ program_SMS_reminder_form +="</select>";
+
+ jQuery( document ).ready( function()
+ {
+ validation( 'addProgramForm', function( form ){
if( duplicate==true)
return false;
else{
@@ -302,4 +308,6 @@
var i18n_from_the_day_set = '$encoder.jsEscape( $i18n.getString( "from_the_day_set" ) , "'")';
var i18n_complete_program = '$encoder.jsEscape( $i18n.getString( "complete_program" ) , "'")';
var i18n_program_enrollment = '$encoder.jsEscape( $i18n.getString( "program_enrollment" ) , "'")';
+ var i18n_user_group = '$encoder.jsEscape( $i18n.getString( "user_group" ) , "'")';
+
</script>
=== 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-24 07:03:54 +0000
+++ 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
@@ -5,26 +5,26 @@
#end
program_SMS_reminder_form +="</select>";
jQuery( document ).ready( function()
-{
- validation( 'updateProgramForm', function( form ){
- if( duplicate==true)
- return false;
- else{
- enable('dateOfEnrollmentDescription');
- enable('dateOfIncidentDescription');
- form.submit();
- }
- }, function(){
- duplicate = false;
- var COLOR_RED = '#ff8a8a';
- jQuery(".daysAllowedSendMessage").each( function( i, a ){
- jQuery(".daysAllowedSendMessage").each( function(j, b){
- if( i!=j && a.value==b.value){
- jQuery( a ).css( 'background-color', COLOR_RED );
- jQuery( b ).css( 'background-color', COLOR_RED );
- duplicate = true;
- }
- });
+ {
+ validation( 'updateProgramForm', function( form ){
+ if( duplicate==true)
+ return false;
+ else{
+ enable('dateOfEnrollmentDescription');
+ enable('dateOfIncidentDescription');
+ form.submit();
+ }
+ }, function(){
+ duplicate = false;
+ var COLOR_RED = '#ff8a8a';
+ jQuery(".daysAllowedSendMessage").each( function( i, a ){
+ jQuery(".daysAllowedSendMessage").each( function(j, b){
+ if( i!=j && a.value==b.value){
+ jQuery( a ).css( 'background-color', COLOR_RED );
+ jQuery( b ).css( 'background-color', COLOR_RED );
+ duplicate = true;
+ }
+ });
});
var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );