← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10497: Minor fix.

 

------------------------------------------------------------
revno: 10497
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-04-08 15:46:38 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.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/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2013-04-08 08:33:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2013-04-08 08:46:38 +0000
@@ -294,24 +294,3 @@
 {
 	jQuery("[name=tr" + rowId + "]").remove();
 }
-
-// ----------------------------------------------------------
-// Validate program stage name
-// ----------------------------------------------------------
-
-function validateName( name )
-{
-	var valid = true;
-	for( var i=0; i<programStageList.length; i++){
-		if( programStageList[i]==name){
-			var nameField = jQuery('#name').addClass('error');
-			$( "<span for='name' generated='true' class='error' style='display: inline;'>" + i18n_name_exists + "</span>")
-				.insertAfter( nameField );
-			valid = false;
-		}
-	}
-	if(valid)
-	{
-		$("span[for=name]").remove();
-	}
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js	2012-11-08 04:13:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js	2013-04-08 08:46:38 +0000
@@ -61,7 +61,7 @@
 		});
 	});
 	
-	checkValueIsExist( "name", "validateProgramStage.action", {id:getFieldValue('id')});	
+	checkValueIsExist( "name", "validateProgramStage.action", {id:getFieldValue('programId'), programStageId:getFieldValue('id')});	
 	
 	jQuery("#availableList").dhisAjaxSelect({
 		source: "../dhis-web-commons-ajax-json/getDataElements.action?domain=patient",

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2013-03-14 13:30:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2013-04-08 08:46:38 +0000
@@ -6,6 +6,7 @@
 
 <form id="updateProgramStageForm" name="updateProgramStageForm" action="updateProgramStage.action" method="post">
 	<input type="hidden" id="id" name="id" value="$programStage.id"/>
+	<input type="hidden" id="programId" name="programId" value="$programStage.program.id"/>
 	<select id='daysAllowedSendMessages' name="daysAllowedSendMessages" multiple="multiple" class="hidden"></select>
 	<select id='templateMessages' name="templateMessages" multiple="multiple" class="hidden"></select>