← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10676: Fix bug: Don't delete common custom registration form.

 

------------------------------------------------------------
revno: 10676
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-04-24 14:59:51 +0700
message:
  Fix bug: Don't delete common custom registration form.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.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/patientRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.vm	2013-04-24 07:53:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientRegistrationForm.vm	2013-04-24 07:59:51 +0000
@@ -23,6 +23,7 @@
 			  </tr>
 			</thead>
 			  <tbody class="list">
+				#set($hasCommonForm = 'false')
 				#foreach( $registrationForm in $registrationForms )
 				  <tr id="tr${registrationForm.program.id}">
 					<td>
@@ -30,6 +31,7 @@
 							$encoder.htmlEncode( $registrationForm.program.name )
 						#else
 							$i18n.getString('all')
+							#set($hasCommonForm = 'true')
 						#end	
 					</td>  
 					<td>
@@ -44,14 +46,24 @@
 				  </tr>
 				#end
 				#foreach($program in $programs)
-					<tr id="tr${registrationForm.id}">
+				<tr id="tr${registrationForm.id}">
 					<td>$encoder.htmlEncode( $program.name )</td>  
 					<td>[$i18n.getString('none')]</td>   					
 					<td style="text-align:center">
 					  <a href="javascript:addNewForm($program.id)" title="$i18n.getString( 'design_data_entry_form' )"><img src="../images/add.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
 					  <img src='../images/delete-denied.png' title='$i18n.getString("remove")'>
 					</td>
-				  </tr>
+				</tr>
+				#end
+				#if($hasCommonForm=='false')
+				 <tr id="tr${registrationForm.id}">
+					<td>$i18n.getString('all')</td>  
+					<td>[$i18n.getString('none')]</td>   					
+					<td style="text-align:center">
+					  <a href="javascript:addNewForm('')" title="$i18n.getString( 'design_data_entry_form' )"><img src="../images/add.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
+					  <img src='../images/delete-denied.png' title='$i18n.getString("remove")'>
+					</td>
+				</tr>
 				#end
 			  </tbody>
         </table>