dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19296
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8349: Small changes for program and program-stage form.
------------------------------------------------------------
revno: 8349
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-03 11:27:41 +0700
message:
Small changes for program and program-stage form.
modified:
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/addProgramForm.vm
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/program.js
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/programList.vm
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/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/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 2012-10-01 09:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-10-03 04:27:41 +0000
@@ -48,7 +48,7 @@
confirm_delete_prorgam_stage=Are you sure you want to delete this program stage?
available_data_elements=Available data elements
selected_data_elements=Selected data elements
-program_stage_details=Details of program stage
+program_stage_details=Program stage details
edit_program_stage=Edit program stage
create_new_program_stage=Create new program stage
order=Order in program
@@ -298,9 +298,12 @@
add_more = Add more ...
inherit = Inherit
auto_generate_event = Auto-generate event
-generated_by_enrollment_date = Generated by enrollment date
+events_generated_by_enrollment_date = Events generated by enrollment date
execute_success = Execute successfully
plus = Plus
diff_from = Different from
not_null = Not null
-confirm_delete_prorgam_stage_section = Are you sure you want to delete this program stage section ?
\ No newline at end of file
+confirm_delete_prorgam_stage_section = Are you sure you want to delete this program stage section ?
+form_details = Form details
+enrollment_details = Enrollment details
+repeatable_program_stage_details = Repeatable program stage details
\ 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/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-10-03 03:46:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-10-03 04:27:41 +0000
@@ -37,24 +37,32 @@
</tr>
<tr>
+ <td><label>$i18n.getString( "events_generated_by_enrollment_date" )</label></td>
+ <td><input style="margin: 0;"type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true'></td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <th colspan="2">$i18n.getString( "form_details" )</th>
+ </tr>
+
+ <tr>
<td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
<td><input style="margin: 0;"type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' checked></td>
<td></td>
</tr>
<tr>
+ <th colspan="2">$i18n.getString( "enrollment_details" )</th>
+ </tr>
+
+ <tr>
<td><label>$i18n.getString( "show_incident_date" )</label></td>
<td><input style="margin: 0;"type="checkbox" id="displayIncidentDate" name="displayIncidentDate" value='true' checked onchange='programOnChange();'></td>
<td></td>
</tr>
<tr>
- <td><label>$i18n.getString( "generated_by_enrollment_date" )</label></td>
- <td><input style="margin: 0;"type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true'></td>
- <td></td>
- </tr>
-
- <tr>
<td><label>$i18n.getString( "date_of_enrollment_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td><input style="width: 330px;" type="text" id="dateOfEnrollmentDescription" name="dateOfEnrollmentDescription" class="{validate:{required:true,minlength:4}}"></td>
<td></td>
@@ -65,6 +73,8 @@
<td><input style="width: 330px;" type="text" id="dateOfIncidentDescription" name="dateOfIncidentDescription" class="{validate:{required:true,minlength:2}}"></td>
<td></td>
</tr>
+
+ <tr><td> </td><td> </td></tr>
<tbody>
</table>
=== 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 2012-09-28 06:26:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2012-10-03 04:27:41 +0000
@@ -22,24 +22,28 @@
</tr>
<tr>
- <td><label>$i18n.getString( "report_date_description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="reportDateDescription" name="reportDateDescription" class="{validate:{required:true}}" /></td>
- </tr>
-
- <tr>
<td><label>$i18n.getString( "scheduled_days_from_start" )</label></td>
<td><input type="text" id="minDaysFromStart" name="minDaysFromStart" class="{validate:{number:true,min:0}}"/></td>
</tr>
-
+
<tr>
<td><label>$i18n.getString( "auto_generate_event" )</label></td>
<td><input type="checkbox" id="autoGenerateEvent" name="autoGenerateEvent" value='true' checked /></td>
- </tr>
+ </tr>
+
+ <tr><th colspan="2">$i18n.getString( "form_details" )</th></tr>
+
+ <tr>
+ <td><label>$i18n.getString( "report_date_description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td><input type="text" id="reportDateDescription" name="reportDateDescription" class="{validate:{required:true}}" /></td>
+ </tr>
+
+ <tr><th colspan="2">$i18n.getString( "repeatable_program_stage_details" )</th></tr>
<tr>
<td><label>$i18n.getString( "repeatable" )</label></td>
<td><input type="checkbox" id="irregular" name="irregular" value='true' onchange='repeatableOnChange();' /></td>
- </tr>
+ </tr>
<tr>
<td><label>$i18n.getString( "standard_interval_days" )</label></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2012-10-03 03:46:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2012-10-03 04:27:41 +0000
@@ -55,8 +55,11 @@
disable('dateOfEnrollmentDescription');
disable("displayIncidentDate");
disable("dateOfIncidentDescription");
+ jQuery("[name=displayed]").attr("disabled", true);
+ jQuery("[name=displayed]").removeAttr("checked");
}
else{
+ jQuery("[name=displayed]").prop("disabled", false);
enable('dateOfEnrollmentDescription');
enable("displayIncidentDate");
if(byId('displayIncidentDate').checked){
@@ -88,6 +91,11 @@
jQuery( item ).remove();
}
});
+
+ if(getFieldValue('type') == "3")
+ {
+ jQuery("[name=displayed]").attr("disabled", true);
+ }
}
=== 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 2012-09-28 06:26:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2012-10-03 04:27:41 +0000
@@ -235,14 +235,14 @@
}
// --------------------------------------------------------------------
-//
+// Generate template message form
// --------------------------------------------------------------------
function generateTemplateMessageForm()
{
var rowId = jQuery('.daysAllowedSendMessage').length + 1;
- var contend = '<tr name="tr' + rowId + '">'
+ var contend = '<tr name="tr' + rowId + '" class="listAlternateRow" >'
+ '<td colspan="2">' + i18n_reminder + ' ' + rowId + '<a href="javascript:removeTemplateMessageForm('+ rowId +')"> ( '+ i18n_remove_reminder + ' )</a></td>'
+ '</tr>'
+ '<tr name="tr' + rowId + '">'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2012-10-03 03:46:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2012-10-03 04:27:41 +0000
@@ -52,7 +52,7 @@
<p><label class="bold">$i18n.getString( "type" ):</label><br><span id="typeField"></span></p>
<p><label class="bold">$i18n.getString( "display_provided_other_facility_column" ):</label><br><span id="displayProvidedOtherFacilityField"></span></p>
<p><label class="bold">$i18n.getString( "display_date_of_incident" ):</label><br><span id="displayIncidentDateField"></span></p>
- <p><label class="bold">$i18n.getString( "generated_by_enrollment_date" ):</label><br><span id="generatedByEnrollmentDateField"></span></p>
+ <p><label class="bold">$i18n.getString( "events_generated_by_enrollment_date" ):</label><br><span id="generatedByEnrollmentDateField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_enrollment_description" ):</label><br><span id="dateOfEnrollmentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_incident_description" ):</label><br><span id="dateOfIncidentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "number_of_attributes" ):</label><br><span id="noAttributesField"></span></p>
=== 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-10-03 03:46:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2012-10-03 04:27:41 +0000
@@ -35,30 +35,39 @@
</td>
<td></td>
</tr>
-
+
+ <tr>
+ <td><label>$i18n.getString( "events_generated_by_enrollment_date" )</label></td>
+ <td><input style="margin: 0;"type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true' #if($program.generatedByEnrollmentDate=='true') checked #end></td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "version" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+ <td><input style="width: 330px;" type="text" id="version" name="version" value="$program.version" class="{validate:{required:true,number:true}}"></td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <th colspan="2">$i18n.getString( "form_details" )</th>
+ </tr>
+
<tr>
<td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
<td><input style="margin: 0;" type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' #if( $program.displayProvidedOtherFacility=='false' ) checked #end ></td>
<td></td>
</tr>
-
+
+ <tr>
+ <th colspan="2">$i18n.getString( "enrollment_details" )</th>
+ </tr>
+
<tr>
<td><label>$i18n.getString( "show_incident_date" )</label></td>
<td><input style="margin: 0;"type="checkbox" id="displayIncidentDate" name="displayIncidentDate" value='true' onchange='programOnChange();' #if( $program.type=='3' ) disabled #elseif($program.displayIncidentDate=='true') checked #end></td>
<td></td>
</tr>
-
- <tr>
- <td><label>$i18n.getString( "generated_by_enrollment_date" )</label></td>
- <td><input style="margin: 0;"type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true' #if($program.generatedByEnrollmentDate=='true') checked #end></td>
- <td></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "version" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input style="width: 330px;" type="text" id="version" name="version" value="$program.version" class="{validate:{required:true,number:true}}"></td>
- <td></td>
- </tr>
+
<tr>
<td><label>$i18n.getString( "date_of_enrollment_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td><input style="width: 330px;" type="text" id="dateOfEnrollmentDescription" name="dateOfEnrollmentDescription" value="$!program.dateOfEnrollmentDescription" class="{validate:{required:true,minlength:4}}" #if( $program.type=='3' ) disabled #end></td>
@@ -68,7 +77,10 @@
<td><label>$i18n.getString( "date_of_incident_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td><input style="width: 330px;" type="text" id="dateOfIncidentDescription" name="dateOfIncidentDescription" value="$!program.dateOfIncidentDescription" class="{validate:{required:true,minlength:4}}" #if( $program.type=='2' || $program.type=='3') disabled #end ></td>
<td></td>
- </tr>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+
<tbody>
</table>
@@ -113,7 +125,7 @@
#foreach( $identifier in $program.patientIdentifierTypes )
<tr ondblclick="unSelectProperties( this )" id="iden_$identifier.id">
<td onmousedown="select(event, this)">$encoder.htmlEncode( $identifier.name )</td>
- <td align="center"><input type="checkbox" name="displayed" value="iden_$identifier.id" #if($identifier.personDisplayName == true ) checked #end /></td>
+ <td align="center"><input type="checkbox" name="displayed" value="iden_$identifier.id" #if($identifier.personDisplayName == true ) checked #end #if($program.type==3) disabled #end /></td>
</tr>
#end
#foreach( $attribute in $program.patientAttributes )
=== 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 2012-09-28 06:26:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2012-10-03 04:27:41 +0000
@@ -20,12 +20,7 @@
<tr>
<td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $programStage.description )" class="{validate:{required:true,minlength:4}}"/></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "report_date_description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="reportDateDescription" name="reportDateDescription" value='$!programStage.reportDateDescription' class="{validate:{required:true}}" /></td>
- </tr>
+ </tr>
<tr>
<td><label>$i18n.getString( "scheduled_days_from_start" )</label></td>
@@ -35,21 +30,30 @@
<tr>
<td><label>$i18n.getString( "auto_generate_event" )</label></td>
<td><input type="checkbox" id="autoGenerateEvent" name="autoGenerateEvent" value='true' #if( $programStage.autoGenerateEvent && $programStage.autoGenerateEvent=='true' ) checked #end /></td>
- </tr>
+ </tr>
+
+ <tr><th colspan="2">$i18n.getString( "form_details" )</th></tr>
+ <tr>
+ <td><label>$i18n.getString( "report_date_description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td><input type="text" id="reportDateDescription" name="reportDateDescription" value='$!programStage.reportDateDescription' class="{validate:{required:true}}" /></td>
+ </tr>
+
#if($programStage.program.type!=3)
- <tr>
- <td><label>$i18n.getString( "repeatable" )</label></td>
- <td><input type="checkbox" id="irregular" name="irregular" value='true' #if( $programStage.irregular && $programStage.irregular=='true' ) checked #end onchange='repeatableOnChange();' /></td>
- </tr>
+ <tr><th colspan="2">$i18n.getString( "repeatable_program_stage_details" )</th></tr>
+
+ <tr>
+ <td><label>$i18n.getString( "repeatable" )</label></td>
+ <td><input type="checkbox" id="irregular" name="irregular" value='true' #if( $programStage.irregular && $programStage.irregular=='true' ) checked #end onchange='repeatableOnChange();' /></td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "standard_interval_days" )</label></td>
+ <td><input type="text" id="standardInterval" name="standardInterval" value='$!programStage.standardInterval' class="{validate:{required:true,number:true}}" #if($programStage.irregular!='true' ) disabled #end /></td>
+ </tr>
#end
-
- <tr>
- <td><label>$i18n.getString( "standard_interval_days" )</label></td>
- <td><input type="text" id="standardInterval" name="standardInterval" value='$!programStage.standardInterval' class="{validate:{required:true,number:true}}" #if($programStage.irregular!='true' ) disabled #end /></td>
- </tr>
-
</tbody>
+ <tr><td> </td><td> </td></tr>
</table>
<table id="programStageMembersArea">
@@ -118,7 +122,7 @@
#set($index = 0)
#foreach($reminder in $programStage.patientReminders)
#set($index = $index + 1)
- <tr name="tr$index">
+ <tr name="tr$index" class="listAlternateRow" >
<td colspan='2'>
$i18n.getString( "reminder" ) $index
<span style="align:right"><a href='javascript:removeTemplateMessageForm($index)'> ( $i18n.getString("remove_reminder") )</a>