dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17987
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7394: Disable the complete and add new button if the event is completed.
------------------------------------------------------------
revno: 7394
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-06-26 09:41:54 +0700
message:
Disable the complete and add new button if the event is completed.
modified:
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/webapp/dhis-web-caseentry/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
--
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-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-06-25 15:09:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-06-26 02:41:54 +0000
@@ -66,7 +66,7 @@
other_facility=Private facility
error_required_field=Please enter value for all data element in red color.
complete_confirm_message=Are you sure this event is completed ?
-complete=Complete data entry
+complete=Complete
case_aggregation_form=Person aggregation form
dataset_list=Dataset List
multiple_name_based=Multiple Name-based
@@ -363,9 +363,9 @@
save_all = Save all
list_all_events = List All Events
search_events_by_dataelements = Search events by data elements
-list_all_events = List all events
specify_data_element = Please specify a data element
advanced_search = Advanced search
no_patient_enrolled_the_program = No person enrolled the program
-complete_and_add_new_event = Complete and add new
-no_compulsary_data_elements = No compulsary data elements
\ No newline at end of file
+complete_and_add_new_event = Complete & Add new
+no_compulsary_data_elements = No compulsary data elements
+single_event_with_registration = Single event with registration
\ No newline at end of file
=== 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-06-25 18:52:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-06-26 02:41:54 +0000
@@ -41,7 +41,7 @@
<input type="button" id='addBtn' value='$i18n.getString( "add_new" )' onclick="showAddEventForm();">
</td>
<td>
- <input type="button" value='$i18n.getString( "advanced_search" )' onclick="jQuery('#advanced-search').toggle();">
+ <input type="button" value='$i18n.getString( "advanced_search" )' onclick="jQuery('#advanced-search').slideToggle();">
</td>
</tr>
</table>
@@ -95,9 +95,9 @@
<div id='dataEntryInfor' class='hidden'>
<h4 id='programName' name='programName'></h4>
<p>
- <input type="button" id='backBtn' value="$i18n.getString( 'back' )" onclick="javascript:backEventList();" >
- <input type="button" onclick="doComplete()" value="$i18n.getString('complete')" id="completeBtn">
- <input type="button" onclick="completedAndAddNewEvent()" value="$i18n.getString('complete_and_add_new_event')" id="completeBtn">
+ <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="completedAndAddNewEvent()" value="$i18n.getString('complete_and_add_new_event')" id="completeAndAddNewBtn" style='width:150px;'>
</p>
<div id='dataEntryFormDiv'></div>
</div>
@@ -136,6 +136,7 @@
var i18n_list_all_events = '$encoder.jsEscape( $i18n.getString( "list_all_events" ) , "'")';
var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
+ var i18n_no_compulsary_data_elements = '$encoder.jsEscape( $i18n.getString( "no_compulsary_data_elements" ) , "'")';
isAjax = true;
contentDiv = '';
=== 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-06-25 14:15:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-06-26 02:41:54 +0000
@@ -156,6 +156,7 @@
{
var flag = true;
if( listAll && jQuery( '#compulsoryDE option' ).length == 0 ){
+ showWarningMessage( i18n_no_compulsary_data_elements );
flag = false;
}
else if( !listAll )
@@ -305,9 +306,11 @@
if( getFieldValue('completed')=='true' ){
disable('completeBtn');
+ disable('completeAndAddNewBtn');
}
else{
enable('completeBtn');
+ enable('completeAndAddNewBtn');
}
hideById('loaderDiv');