← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13504: Apply context menu for custom registration form function; Remove registration-date option in repo...

 

------------------------------------------------------------
revno: 13504
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-31 10:05:28 +0700
message:
  Apply context menu for custom registration form function; Remove registration-date option in reportDateToUse property of Program-stage; minor fix for tabular report.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelRegistrationFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetPatientRegistrationFormListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientRegistrationForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.vm
  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-api/src/main/java/org/hisp/dhis/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2013-12-20 13:39:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java	2013-12-31 03:05:28 +0000
@@ -58,8 +58,6 @@
 
     public static final String TYPE_CUSTOM = "custom";
 
-    public static final String REPORT_DATE_TO_USE_REGISTRATION_DATE = "registrationDate";
-
     public static final String REPORT_DATE_TO_USE_INCIDENT_DATE = "dateOfIncident";
 
     public static final String REPORT_DATE_TO_USE_ENROLLMENT_DATE = "enrollmentDate";
@@ -233,7 +231,7 @@
         this.description = description;
     }
 
-    @JsonProperty("repeatable")
+    @JsonProperty( "repeatable" )
     @JsonView( { DetailedView.class, ExportView.class } )
     @JacksonXmlProperty( localName = "repeatable", namespace = DxfNamespaces.DXF_2_0 )
     public Boolean getIrregular()

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2013-12-30 04:24:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2013-12-31 03:05:28 +0000
@@ -128,7 +128,7 @@
 			<param name="requiredAuthorities">F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_DELETE</param>
 		</action>
 
-    <action name="cacheManifest" class="org.hisp.dhis.appcache.AppCacheAction">
+    	<action name="cacheManifest" class="org.hisp.dhis.appcache.AppCacheAction">
 			<result name="success" type="velocity-cache-manifest">/dhis-web-caseentry/cacheManifest.vm</result>
 		</action>
 
@@ -570,7 +570,7 @@
 			<result name="success" type="velocity-json">
 				/dhis-web-commons/ajax/jsonResponseSuccess.vm
 			</result>
-			<param name="requiredAuthorities">F_PATIENT_ADD</param>
+			<param name="anyAuthorities">F_ALLOW_EDIT_PATIENT_PROPERTIES, F_ALLOW_EDIT_PATIENT_ATTRIBUTES, F_ALLOW_EDIT_PATIENT_IDENTIFIERS</param>
 		</action>
 
 		<action name="validatePatient"
@@ -755,7 +755,7 @@
 			class="org.hisp.dhis.caseentry.action.patient.ShowAddRelationshipFormAction">
 			<result name="success" type="velocity">/content.vm</result>
 			<param name="page">/dhis-web-caseentry/addRelationshipForm.vm</param>
-			<param name="requiredAuthorities">F_RELATIONSHIP_ADD</param>
+			<param name="requiredAuthorities">F_RELATIONSHIP_ADD, F_PATIENT_ADD</param>
 		</action>
 
 		<action name="validateSearchRelationship"
@@ -836,7 +836,7 @@
 			class="org.hisp.dhis.caseentry.action.patient.GetPatientAction">
 			<result name="success" type="velocity">/content.vm</result>
 			<param name="page">/dhis-web-caseentry/addRelationshipPatientForm.vm</param>
-			<param name="requiredAuthorities">F_PATIENT_ADD, F_RELATIONSHIP_ADD</param>
+			<param name="requiredAuthorities">F_RELATIONSHIP_ADD, F_PATIENT_ADD</param>
 		</action>
 
 		<!-- Tabular report -->

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-12-25 09:22:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-12-31 03:05:28 +0000
@@ -1908,8 +1908,7 @@
 				{
 					url +=  programId + "." + type 
 					if (Ext.getCmp('programStageCombobox').getValue() != '') {
-						url += "?stage=" + programStageId
-						return false;
+						url += "?stage=" + programStageId;
 					}
 					else{
 						url += "?";
@@ -1923,7 +1922,6 @@
 					url += programId + ".json";
 					if (Ext.getCmp('programStageCombobox').getValue() != '') {
 						url += "?stage=" + programStageId;
-						return false;
 					}
 					TR.util.mask.showMask(TR.cmp.region.center, TR.i18n.loading);
 					Ext.Ajax.request({
@@ -2063,8 +2061,7 @@
 			generate: function( type ) {
 				
 				// Validation
-				if( !TR.state.aggregateReport.validation.objects() )
-				{
+				if( !TR.state.aggregateReport.validation.objects() ){
 					return;
 				}
 				
@@ -2078,8 +2075,7 @@
 				{
 					url += programId + "." + type 
 					if (Ext.getCmp('programStageCombobox').getValue() != '') {
-						url += "?stage=" + programStageId
-						return false;
+						url += "?stage=" + programStageId;
 					}
 					else{
 						url += "?";
@@ -2093,7 +2089,6 @@
 					url += programId + ".json";
 					if (Ext.getCmp('programStageCombobox').getValue() != '') {
 						url += "?stage=" + programStageId;
-						return false;
 					}
 					
 					TR.util.mask.showMask(TR.cmp.region.center, TR.i18n.loading);

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2013-12-20 22:53:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2013-12-31 03:05:28 +0000
@@ -363,6 +363,7 @@
 	showById('selectDiv');
 	showById('searchDiv');
 	showById('listPatientDiv');
+	showById('searchByIdTR');
 	
 	hideById('editPatientDiv');
 	hideById('enrollmentDiv');

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-12-18 06:28:58 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-12-31 03:05:28 +0000
@@ -34,6 +34,7 @@
     <td>    
       <table class="listTable" id="patientList" width='100%'>               
           <col width="30"/>
+		  <col/>
 		  #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
 			#foreach( $attribute in $patientAttributes )
 				#if($attribute)<col/>#end
@@ -44,9 +45,6 @@
 				<col/>
 				#end
 			#end
-			#if( $identifierTypes.size()==0 )
-				<col/>       
-			#end
 		  #end
 		  
 		  #if($mapPatientOrgunit.size()!=0)

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm	2013-10-21 07:40:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm	2013-12-31 03:05:28 +0000
@@ -21,9 +21,7 @@
 							#end
 							
 							#set($reportDateToUse = "")
-							#if($programStageInstance.programStage.reportDateToUse=='registrationDate' )
-								#set($reportDateToUse = "$format.formatDate( $programInstance.patient.registrationDate)")
-							#elseif($programStageInstance.programStage.reportDateToUse=='dateOfIncident' )
+							#if($programStageInstance.programStage.reportDateToUse=='dateOfIncident' )
 								#set($reportDateToUse = "$format.formatDate( $programInstance.dateOfIncident)")
 							#elseif($programStageInstance.programStage.reportDateToUse=='enrollmentDate' )
 								#set($reportDateToUse = "$format.formatDate( $programInstance.enrollmentDate)")

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelRegistrationFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelRegistrationFormAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/DelRegistrationFormAction.java	2013-12-31 03:05:28 +0000
@@ -80,7 +80,7 @@
         throws Exception
     {
         PatientRegistrationForm registrationForm = null;
-        
+
         if ( id != null )
         {
             Program program = programService.getProgram( id );
@@ -91,9 +91,12 @@
         {
             registrationForm = patientRegistrationFormService.getCommonPatientRegistrationForm();
         }
+
+        if ( registrationForm != null )
+        {
+            patientRegistrationFormService.deletePatientRegistrationForm( registrationForm );
+        }
         
-        patientRegistrationFormService.deletePatientRegistrationForm( registrationForm );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetPatientRegistrationFormListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetPatientRegistrationFormListAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetPatientRegistrationFormListAction.java	2013-12-31 03:05:28 +0000
@@ -31,7 +31,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.patient.PatientRegistrationForm;
@@ -71,11 +74,11 @@
     // Getters & Setters
     // -------------------------------------------------------------------------
 
-    private Collection<PatientRegistrationForm> registrationForms;
+    private Map<Integer, PatientRegistrationForm> mapRegistrationForms = new HashMap<Integer, PatientRegistrationForm>();
 
-    public Collection<PatientRegistrationForm> getRegistrationForms()
+    public Map<Integer, PatientRegistrationForm> getMapRegistrationForms()
     {
-        return registrationForms;
+        return mapRegistrationForms;
     }
 
     private List<Program> programs;
@@ -92,20 +95,23 @@
     public String execute()
         throws Exception
     {
-        registrationForms = patientRegistrationFormService.getAllPatientRegistrationForms();
-
-        programs = new ArrayList<Program>( programService.getAllPrograms() );
-
-        programs.removeAll( programService.getPrograms( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ) );
+        Collection<PatientRegistrationForm> registrationForms = patientRegistrationFormService
+            .getAllPatientRegistrationForms();
 
         for ( PatientRegistrationForm registrationForm : registrationForms )
         {
             if ( registrationForm.getProgram() != null )
             {
-                programs.remove( registrationForm.getProgram() );
+                mapRegistrationForms.put( registrationForm.getProgram().getId(), registrationForm );
+            }
+            else
+            {
+                mapRegistrationForms.put( 0, registrationForm );
             }
         }
 
+        programs = new ArrayList<Program>( programService.getAllPrograms() );
+
         Collections.sort( programs, IdentifiableObjectNameComparator.INSTANCE );
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-12-21 23:14:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-12-31 03:05:28 +0000
@@ -482,4 +482,5 @@
 scheduling_of_events = Scheduling of events
 show_advanced_options = Show advanced options
 tracker_associate = Tracker associate
-view_validation_criteria = View validation criteria
\ No newline at end of file
+view_validation_criteria = View validation criteria
+define_registration_form= Define registration form
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm	2013-12-17 01:29:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm	2013-12-31 03:05:28 +0000
@@ -97,7 +97,6 @@
 			<td>
 				<select id="reportDateToUse" name="reportDateToUse" class="{validate:{required:true}}" disabled>
 					<option value=''>[$i18n.getString('please_select')]</option>
-					<option value='registrationDate'>$i18n.getString("registration_date")</option>
 					<option value='dateOfIncident'>$i18n.getString("date_of_incident")</option>
 					<option value='enrollmentDate'>$i18n.getString("date_of_enrollment")</option>
 				</select>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientRegistrationForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientRegistrationForm.js	2013-10-08 08:47:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientRegistrationForm.js	2013-12-31 03:05:28 +0000
@@ -1,24 +1,21 @@
-
-function addNewForm( programId ){
-	window.location.href='viewPatientRegistrationForm.action?programId=' + programId;
-}
-
-function updateNewForm( registrationFormId, programId ){
-	window.location.href='viewPatientRegistrationForm.action?programId=' + programId + '&id=' + registrationFormId;
-}
-
-function removeRegistrationForm( programId, programName )
+$(function() {
+  dhis2.contextmenu.makeContextMenu({
+    menuId: 'contextMenu',
+    menuItemActiveClass: 'contextMenuItemActive'
+  });
+});
+
+function defineForm( context ){
+	window.location.href='viewPatientRegistrationForm.action?programId=' + context.id;
+}
+
+function removeRegistrationForm( context )
 {
-	var result = window.confirm( i18n_confirm_delete + "\n\n" + programName );
+	var result = window.confirm( i18n_confirm_delete + "\n\n" + context.name );
     
     if ( result )
     {
-		jQuery.postJSON("delRegistrationFormAction.action", {id:programId}
-		, function(json) {
-			hideById('active_' + programId);
-			showById('define_' + programId);
-			hideById('update_' + programId);
-			showById('add_' + programId);
-		});
+		jQuery.postJSON("delRegistrationFormAction.action", {id:context.id}
+		,function(json) {});
 	}
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.vm	2013-12-17 01:29:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.vm	2013-12-31 03:05:28 +0000
@@ -1,88 +1,51 @@
-<style>
-  .listTable > tbody > tr > td {
-    padding: 8px 0 8px 5px;
-  }
-</style>
 
 <h3>$i18n.getString( "patient_registration_form_management" ) #openHelp( "person_registration_form" )</h3>
 
-<table class='mainPageTable'>
-	#set($display = 'block')
-	#foreach( $registrationForm in $registrationForms )
-		#if( $!registrationForm.program )
-		#else
-			#set($display = 'none')
+<div id="contextMenu" class="contextMenu">
+  <ul id="contextMenuItems" class="contextMenuItems">
+    <li><a data-target-fn="defineForm"><i class="fa fa-edit"></i>&nbsp;&nbsp;$i18n.getString( "define_registration_form" )</a></li>
+    <li><a data-target-fn="removeRegistrationForm"><i class="fa fa-trash-o"></i>&nbsp;&nbsp;$i18n.getString( "remove" )</a></li>
+  </ul>
+</div>
+
+
+<table class="listTable">
+	<col>          
+	<thead>			  
+	  <tr>  
+		<th>$i18n.getString( "program" )</th>
+	  </tr>
+	</thead>
+	<tbody class="list">
+		<tr id="tr" data-id="" data-uid="" 
+			data-type="PatientRegistrationForm" 
+			data-name="$i18n.getString( 'no_program' )">
+				#if($mapRegistrationForms.get('0'))
+					<td><a>$i18n.getString('no_program')</a></td> 
+				#else
+					<td>$i18n.getString('no_program')</td> 
+				#end
+		</tr>
+		
+		<tbody id="list">
+		#foreach($program in $programs)
+			<tr id="tr${program.id}" 
+				data-id="$!program.id" data-uid="$!program.uid" 
+				data-type="PatientRegistrationForm" 
+				data-name="$encoder.htmlEncode( $!program.displayName )">
+				
+				#if($mapRegistrationForms.get($program.id))
+					<td><a>$program.name</a></td>
+				#else
+					<td>$program.name</td>
+				#end
 		#end
-	#end
-  <tr>
-    <td style="vertical-align:top" colspan='2'>
-		<table class="listTable" id='formList'>
-			  <col>   
-			  <col width="100">
-			<thead>			  
-			  <tr>  
-				<th>$i18n.getString( "program" )</th>
-				<th class="{sorter: false}">$i18n.getString( "operations" )</th>
-			  </tr>
-			</thead>
-			  <tbody class="list">
-				#set($hasCommonForm = 'false')
-				#foreach( $registrationForm in $registrationForms )
-				  <tr id="tr${registrationForm.program.id}">
-					<td>
-						#if($registrationForm.program)
-							$encoder.htmlEncode( $registrationForm.program.name )
-						#else
-							$i18n.getString('no_program')
-							#set($hasCommonForm = 'true')
-						#end	
-					</td>
-					<td style="text-align:center">
-					  <a href="javascript:updateNewForm($registrationForm.id, '$!registrationForm.program.id')" title="$i18n.getString( 'edit' )"><img src="../images/edit_layout.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
-					  <a href="javascript:removeRegistrationForm( '$!registrationForm.program.id', '$!encoder.jsEncode( $registrationForm.program.name )')" title="$i18n.getString( "remove" )"><img id='active_$registrationForm.program.id' src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
-					  <img id='define_$registrationForm.program.id' style='display:none;' src='../images/delete-denied.png' title='$i18n.getString("remove")'>
-					</td>
-				  </tr>
-				#end
-				
-				#foreach($program in $programs)
-					#set($hasForm = false)
-					#foreach( $registrationForm in $registrationForms )
-						#if($registrationForm.program.id==$program.id)
-							#set($hasForm = true)
-						#end
-					#end
-					
-					#if($hasForm == false)
-						<tr id="tr${registrationForm.id}">
-							<td>$encoder.htmlEncode( $program.name )</td> 	
-							<td style="text-align:center">
-								<a href="javascript:addNewForm($program.id)" title="$i18n.getString( 'design_data_entry_form' )"><img src="../images/edit_layout.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
-								<img src='../images/delete-denied.png' title='$i18n.getString("remove")'>
-							</td>
-						</tr>
-					#end
-				#end
-				#if($hasCommonForm=='false')
-				 <tr id="tr${registrationForm.id}">
-					<td>$i18n.getString('no_program')</td> 			
-					<td style="text-align:center">
-					  <a href="javascript:addNewForm('')" title="$i18n.getString( 'design_data_entry_form' )"><img src="../images/edit_layout.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
-					  <img src='../images/delete-denied.png' title='$i18n.getString("remove")'>
-					</td>
-				</tr>
-				#end
-			  </tbody>
-        </table>
-		</td>
-	</tr>
+		 
+		</tbody>
+	</tbody>
 </table>
 
 <script type="text/javascript">
 	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_registration_form" ) , "'" )';
 	var i18n_please_select = '[' + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )' + ']';
-	
-	tableSorter( 'formList' );
-	var sorting = [[0,0]];
-	$("#formList").trigger("sorton", [sorting]);
 </script>

=== 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-12-17 01:29:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm	2013-12-31 03:05:28 +0000
@@ -99,7 +99,6 @@
 						<select id="reportDateToUse" name="reportDateToUse" class="{validate:{required:true}}" 
 							#if($openAfterEnrollment!='' || $programStage.autoGenerateEvent=='false' ) disabled #elseif($programStage.openAfterEnrollment=='false') disabled #end >
 							<option value=''>[$i18n.getString('please_select')]</option>
-							<option value='registrationDate' #if($programStage.reportDateToUse=='registrationDate') selected #end >$i18n.getString("registration_date")</option>
 							<option value='dateOfIncident' #if($programStage.reportDateToUse=='dateOfIncident') selected #end >$i18n.getString("date_of_incident")</option>
 							<option value='enrollmentDate' #if($programStage.reportDateToUse=='enrollmentDate') selected #end >$i18n.getString("date_of_enrollment")</option>
 						</select>