← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7316: Add validation for type of program in Add/Update program form.

 

------------------------------------------------------------
revno: 7316
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-06-18 09:01:49 +0700
message:
  Add validation for type of program in Add/Update 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	2012-06-14 06:44:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2012-06-18 02:01:49 +0000
@@ -25,9 +25,9 @@
 		</tr>	
 		
 		<tr>
-			<td><label>$i18n.getString( "type" )</label></td>
+			<td><label>$i18n.getString( "type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 			<td>
-				<select style="width: 336px;" id="type" name="type" onchange='programTypeOnChange();'>
+				<select style="width: 336px;" id="type" name="type" onchange='programTypeOnChange();' class="{validate:{required:true}}">
 					<option value=''>[$i18n.getString('please_select')]</option>
 					<option value='1'>$i18n.getString('multiple_events_with_registration')</option>
 					<option value='2'>$i18n.getString('single_event_with_registration')</option>

=== 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	2012-06-14 06:44:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2012-06-18 02:01:49 +0000
@@ -24,9 +24,9 @@
 	  </tr>
 	  
       <tr>
-		<td><label>$i18n.getString( "type" )</label></td>
+		<td><label>$i18n.getString( "type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
-			<select style="width: 336px;" id="type" name="type" onchange='programTypeOnChange();'>
+			<select style="width: 336px;" id="type" name="type" onchange='programTypeOnChange();' class="{validate:{required:true}}">
 				<option value=''>[$i18n.getString('please_select')]</option>
 				<option value='1' #if( $program.type=='1' ) selected #end>$i18n.getString('multiple_events_with_registration')</option>
 				<option value='2' #if( $program.type=='2' ) selected #end>$i18n.getString('single_event_with_registration')</option>