dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18206
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7589: Add uncomplete button for data entry form.
------------------------------------------------------------
revno: 7589
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-12 17:23:25 +0700
message:
Add uncomplete button for data entry form.
added:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
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/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm
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/programStageDataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.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
=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java 2012-07-12 10:23:25 +0000
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.caseentry.action.caseentry;
+
+import org.hisp.dhis.program.ProgramInstance;
+import org.hisp.dhis.program.ProgramInstanceService;
+import org.hisp.dhis.program.ProgramStageInstance;
+import org.hisp.dhis.program.ProgramStageInstanceService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version UncompleteDataEntryAction.java 4:24:51 PM Jul 12, 2012 $
+ */
+public class UncompleteDataEntryAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private ProgramStageInstanceService programStageInstanceService;
+
+ public void setProgramStageInstanceService( ProgramStageInstanceService programStageInstanceService )
+ {
+ this.programStageInstanceService = programStageInstanceService;
+ }
+
+ private ProgramInstanceService programInstanceService;
+
+ public void setProgramInstanceService( ProgramInstanceService programInstanceService )
+ {
+ this.programInstanceService = programInstanceService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input / Output
+ // -------------------------------------------------------------------------
+
+ private Integer programStageId;
+
+ public Integer getProgramStageId()
+ {
+ return programStageId;
+ }
+
+ public void setProgramStageId( Integer programStageId )
+ {
+ this.programStageId = programStageId;
+ }
+
+ public Integer programStageInstanceId;
+
+ public Integer getProgramStageInstanceId()
+ {
+ return programStageInstanceId;
+ }
+
+ public void setProgramStageInstanceId( Integer programStageInstanceId )
+ {
+ this.programStageInstanceId = programStageInstanceId;
+ }
+
+ // -------------------------------------------------------------------------
+ // Implementation Action
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ ProgramStageInstance programStageInstance = programStageInstanceService
+ .getProgramStageInstance( programStageInstanceId );
+
+ if ( programStageInstance == null )
+ {
+ return SUCCESS;
+ }
+
+ programStageInstance.setCompleted( false );
+
+ programStageInstanceService.updateProgramStageInstance( programStageInstance );
+
+ // ----------------------------------------------------------------------
+ // Check Completed status for all of ProgramStageInstance of
+ // ProgramInstance
+ // ----------------------------------------------------------------------
+
+ ProgramInstance programInstance = programStageInstance.getProgramInstance();
+ if ( programInstance.isCompleted() )
+ {
+ programInstance.setCompleted( false );
+ programInstance.setEndDate( null );
+ programInstanceService.updateProgramInstance( programInstance );
+ }
+
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-07-11 04:18:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-07-12 10:23:25 +0000
@@ -111,6 +111,15 @@
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
</bean>
+
+ <bean
+ id="org.hisp.dhis.caseentry.action.caseentry.UncompleteDataEntryAction"
+ class="org.hisp.dhis.caseentry.action.caseentry.UncompleteDataEntryAction"
+ scope="prototype">
+ <property name="programStageInstanceService"
+ ref="org.hisp.dhis.program.ProgramStageInstanceService" />
+ <property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
+ </bean>
<bean
id="org.hisp.dhis.caseentry.action.caseentry.RegisterIrregularEncounterAction"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-07-12 09:01:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-07-12 10:23:25 +0000
@@ -384,4 +384,5 @@
the_stage_is_started_and_due_date_is_after_the_current_date = The stage is started and due date is after the current date.
the_stage_is_not_started_and_due_date_is_before_the_current_date = The stage is not started and due date is before the current date.
value_is_invalid = Value is invalid
-value_is_valid = Value is valid
\ No newline at end of file
+value_is_valid = Value is valid
+uncomplete_confirm_message=Are you sure this event is uncompleted ?
\ No newline at end of file
=== 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 2012-07-11 04:18:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-07-12 10:23:25 +0000
@@ -84,6 +84,13 @@
/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_UPDATE,F_PATIENT_DATAVALUE_DELETE</param>
</action>
+
+ <action name="uncompleteDataEntry"
+ class="org.hisp.dhis.caseentry.action.caseentry.UncompleteDataEntryAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <param name="requiredAuthorities">F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_UPDATE,F_PATIENT_DATAVALUE_DELETE</param>
+ </action>
<action name="saveExecutionDate"
class="org.hisp.dhis.caseentry.action.caseentry.SaveExecutionDateAction">
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-07-04 05:06:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-07-12 10:23:25 +0000
@@ -108,6 +108,7 @@
<p>
<input type="button" id='backBtn' value="$i18n.getString( 'back' )" onclick="javascript:backEventList();" style='width:150px;'>
<input type="button" onclick="doComplete()" value="$i18n.getString('complete')" id="completeBtn" style='width:150px;'>
+ <input type="button" onclick="doUnComplete()" value="$i18n.getString('uncomplete')" id="uncompleteBtn" style='width:150px;' >
<input type="button" onclick="completedAndAddNewEvent()" value="$i18n.getString('complete_and_add_new_event')" id="completeAndAddNewBtn" style='width:150px;'>
</p>
<div id='dataEntryFormDiv'></div>
@@ -133,6 +134,7 @@
var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-07-10 11:18:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-07-12 10:23:25 +0000
@@ -133,6 +133,7 @@
<div id='inputCriteriaDiv' class="page inputCriteria" style="display:none;width:490px;height:29px;">
<input type="button" class='button' id="completeInBelowBtn" value="$i18n.getString('complete')" onClick="doComplete()" disabled="disabled">
+ <input type="button" onclick="doUnComplete()" value="$i18n.getString('uncomplete')" id="uncompleteBelowBtn">
<input type="button" class='button' id="validationInBelowBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" >
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2012-07-12 06:36:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2012-07-12 10:23:25 +0000
@@ -83,6 +83,7 @@
<input type="button" class='button' id="newEncounterBtn" value="$i18n.getString('create_new_event')" onClick="javascript: registerIrregularEncounter( getFieldValue('executionDate') );" disabled="disabled" >
<input type="button" class='button' id="validationBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" disabled="disabled" >
<input type="button" class='button' id="completeBtn" value="$i18n.getString('complete')" onClick="doComplete()" disabled="disabled" >
+ <input type="button" onclick="doUnComplete()" value="$i18n.getString('uncomplete')" id="uncompleteBtn">
<input type="button" class='button' value="$i18n.getString( 'back_to_search' )" id='backBtnFromEntry' onclick="javascript:showSearchForm();" >
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-07-03 09:39:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-07-12 10:23:25 +0000
@@ -301,12 +301,10 @@
setInnerHTML('programName', programName );
if( getFieldValue('completed')=='true' ){
- disable('completeBtn');
- disable('completeAndAddNewBtn');
+ disableCompletedButton( true );
}
else{
- enable('completeBtn');
- enable('completeAndAddNewBtn');
+ disableCompletedButton( false );
}
hideById('loaderDiv');
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-07-10 14:05:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-07-12 10:23:25 +0000
@@ -397,4 +397,4 @@
{
showListPatientDuplicate( messageElement, true );
}
-}
\ No newline at end of file
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-07-12 06:36:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-07-12 10:23:25 +0000
@@ -14,8 +14,9 @@
hideById('dataEntryFormDiv');
setFieldValue('executionDate','');
setFieldValue('dueDate','');
- disable('completeBtn');
- disable('completeInBelowBtn');
+ disableCompletedButton(true);
+ disable('uncompleteBtn');
+ disable('uncompleteInBelowBtn');
disable('validationBtn');
disable('validationInBelowBtn');
disable('newEncounterBtn');
@@ -67,8 +68,7 @@
setEventColorStatus( elementId, status );
}
- disable('completeBtn');
- disable('completeInBelowBtn');
+ disableCompletedButton(true);
disable('validationBtn');
disable('validationInBelowBtn');
showById('programStageIdTR');
@@ -78,8 +78,7 @@
else
{
jQuery('#dueDateTR').attr('class','hidden');
- enable('completeBtn');
- enable('completeInBelowBtn');
+ disableCompletedButton(false);
hideById('programStageIdTR');
hideById('programInstanceFlowDiv');
var programStageInstanceId = '';
@@ -105,8 +104,9 @@
setFieldValue( 'executionDate', '' );
disable('validationBtn');
disable('validationInBelowBtn');
- disable('completeBtn');
- disable('completeInBelowBtn');
+ disableCompletedButton(true);
+ disable('uncompleteBtn');
+ disable('uncompleteInBelowBtn');
disable('newEncounterBtn');
jQuery(".stage-object-selected").removeClass('stage-object-selected');
@@ -133,13 +133,11 @@
}
else if( executionDate != '' && completed == 'false' )
{
- enable('completeBtn');
- enable('completeInBelowBtn');
+ disableCompletedButton(false);
}
else if( completed == 'true' )
{
- disable('completeBtn');
- disable('completeInBelowBtn');
+ disableCompletedButton(true);
}
if( completed == 'true' && irregular == 'true' )
@@ -515,8 +513,7 @@
var selectedProgramStageInstance = jQuery( '#' + prefixId + getFieldValue('programStageInstanceId') );
jQuery(".stage-object-selected").css('border-color', COLOR_LIGHTRED);
jQuery(".stage-object-selected").css('background-color', COLOR_LIGHT_LIGHTRED);
- enable('completeBtn');
- enable('completeInBelowBtn');
+ disableCompletedButton(false);
enable('validationBtn');
enable('validationInBelowBtn');
disable('newEncounterBtn');
@@ -631,8 +628,7 @@
jQuery(".stage-object-selected").css('border-color', COLOR_GREEN);
jQuery(".stage-object-selected").css('background-color', COLOR_LIGHT_GREEN);
- disable('completeBtn');
- disable('completeInBelowBtn');
+ disableCompletedButton(true);
enable('newEncounterBtn');
var irregular = jQuery('#entryFormContainer [name=irregular]').val();
if( irregular == 'true' )
@@ -679,6 +675,25 @@
}
}
+function doUnComplete( isCreateEvent )
+{
+ if( confirm(i18n_uncomplete_confirm_message) )
+ {
+ $.postJSON( "uncompleteDataEntry.action",
+ {
+ programStageInstanceId: getFieldValue('programStageInstanceId')
+ },
+ function (data)
+ {
+ jQuery(".stage-object-selected").css('border-color', COLOR_LIGHTRED);
+ jQuery(".stage-object-selected").css('background-color', COLOR_LIGHT_LIGHTRED);
+ disableCompletedButton(false);
+ });
+ }
+
+}
+
+
function closeDueDateDiv()
{
jQuery('#createNewEncounterDiv').dialog('close');
@@ -763,8 +778,7 @@
{
var programStageInstanceId = json.message;
jQuery('#createNewEncounterDiv').dialog('close');
- enable('completeBtn');
- enable('completeInBelowBtn');
+ disableCompletedButton(false);
disable('newEncounterBtn');
var programStageName = jQuery(".stage-object-selected").attr('psname');
@@ -869,4 +883,20 @@
width: 500,
height: 180
}).show('fast');
-}
\ No newline at end of file
+}
+
+function disableCompletedButton( disabled )
+{
+ if(disabled){
+ disable('completeBtn');
+ disable('completeAndAddNewBtn');
+ enable('uncompleteBtn');
+ enable('uncompleteAndAddNewBtn');
+ }
+ else{
+ enable('completeBtn');
+ enable('completeAndAddNewBtn');
+ disable('uncompleteBtn');
+ disable('uncompleteAndAddNewBtn');
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2012-06-25 04:17:52 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2012-07-12 10:23:25 +0000
@@ -24,7 +24,8 @@
var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
- var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
+ var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_less_incident_date = '$encoder.jsEscape( $i18n.getString( "date_less_incident_date" ) , "'")';
=== 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 2012-07-12 06:36:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-07-12 10:23:25 +0000
@@ -148,7 +148,8 @@
var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
- var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
+ var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm 2012-05-31 07:17:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm 2012-07-12 10:23:25 +0000
@@ -64,6 +64,7 @@
<tr>
<td> </td>
<td><input type="button" id="completeBtn" value="$i18n.getString('complete')" onClick="doComplete()" #if($programStageInstance.completed=='true') disabled #end>
+ <input type="button" onclick="doUnComplete()" value="$i18n.getString('uncomplete')" id="uncompleteBtn" >
<input type="button" id="validationBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" style="width:12em " #if($programStageInstance.executionDate) #else disabled #end>
</td>
<td></td>
@@ -91,7 +92,8 @@
var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
- var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
+ var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-07-12 06:36:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-07-12 10:23:25 +0000
@@ -37,7 +37,8 @@
var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
- var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
+ var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-07-10 07:39:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-07-12 10:23:25 +0000
@@ -78,7 +78,8 @@
var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
- var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
+ var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2012-07-12 06:36:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2012-07-12 10:23:25 +0000
@@ -91,6 +91,7 @@
var i18n_invalid_date = '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")' + ".\n "
var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
+ var i18n_uncomplete_confirm_message = '$encoder.jsEscape( $i18n.getString( "uncomplete_confirm_message" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';