dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19353
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8403: Exception when to click on Complete and add new button in entry form of single event without regi...
------------------------------------------------------------
revno: 8403
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-10-06 20:46:23 +0700
message:
Exception when to click on Complete and add new button in entry form of single event without registration.
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/defaultDataEntryForm.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-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/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-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-10-06 04:54:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-10-06 13:46:23 +0000
@@ -355,7 +355,7 @@
specify_data_element = Please specify a data element
Search = Search
no_patient_enrolled_the_program = No person enrolled the program
-complete_and_add_new_event = Complete and add new
+complete_and_add_new_event = Complete && Add new
no_compulsary_data_elements = No compulsory data elements
single_event_with_registration = Single event with registration
show_data_entry = Show data entry
=== 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-10-06 04:54:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-10-06 13:46:23 +0000
@@ -3,7 +3,6 @@
datePickerInRange( 'startDate' , 'endDate' );
disableCriteriaDiv();
- var standardInterval = 3;
var date = new Date();
var d = date.getDate();
var m = date.getMonth() - 3;
@@ -13,7 +12,7 @@
});
</script>
-<h3>$i18n.getString( "anonymous_events" ) #openHelp('single_event_without_registration')</h3>
+<h3 id='mainLinkLbl'>$i18n.getString( "anonymous_events" ) #openHelp('single_event_without_registration')</h3>
<input type='hidden' id='orgunitId' name='orgunitId' value='$orgunit.id'>
<input type='hidden' id='programStageInstanceId' name='programStageInstanceId'>
<input type='hidden' id='programStageId' name='programStageId' class='stage-object-selected'>
@@ -103,13 +102,10 @@
<div id='listDiv'></div>
<div id='dataEntryInfor' class='hidden'>
- <h4 id='programName' name='programName'></h4>
- <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('incomplete')" id="uncompleteBtn" style='width:150px;' >
- <input type="button" onclick="completedAndAddNewEvent()" value="$i18n.getString('complete_and_add_new_event')" id="completeAndAddNewBtn" style='width:150px;'>
- </p>
+ <h3>
+ <a href="javascript:backEventList();">$i18n.getString( "anonymous_events" )</a>
+ » <span id='programName' name='programName'></span>
+ </h3>
<table>
<tr>
<th><span id="reportDateDescriptionField2">$i18n.getString( "report_date" ) </span> </th>
@@ -122,6 +118,12 @@
</tr>
</table>
<div id='dataEntryFormDiv'></div>
+
+ <div class="page inputCriteria" style="width:490px;height:29px;">
+ <input type="button" onclick="doComplete()" value="$i18n.getString('complete')" id="completeBtn">
+ <input type="button" onclick="doUnComplete()" value="$i18n.getString('incomplete')" id="uncompleteBtn" >
+ <input type="button" onclick="completedAndAddNewEvent()" value="$i18n.getString('complete_and_add_new_event')" id="completeAndAddNewBtn">
+ </div>
</div>
#parse( "dhis-web-commons/loader/loader.vm" )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2012-08-24 10:09:45 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2012-10-06 13:46:23 +0000
@@ -2,13 +2,15 @@
<colgroup>
<col id="deCol">
<col id="entryCol">
+ #if( $!programStageInstance.programStage.program.displayProvidedOtherFacility=='true')
<col width="18%" />
+ #end
</colgroup>
<tr>
<th>$i18n.getString( "data_element" )</th>
<th>$i18n.getString( "entry" )</th>
- #if( $!programStageInstance.programStage.program.isRegistration() == 'true')
+ #if( $!programStageInstance.programStage.program.displayProvidedOtherFacility=='true')
<th>$i18n.getString( "provided_elsewhere" )</th>
#end
</tr>
@@ -88,7 +90,7 @@
/>
#end
</td>
- #if( $!programStageInstance.programStage.program.isRegistration() == 'true' )
+ #if( $!programStageInstance.programStage.program.displayProvidedOtherFacility=='true' )
<td style='width:20px;' align='center'>
#set( $id = $programStageDataElement.programStage.id + '_' + $programStageDataElement.dataElement.id + '_facility' )
#if( $programStageDataElement.allowProvidedElsewhere == 'true')
=== 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-10-06 04:54:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-10-06 13:46:23 +0000
@@ -3,9 +3,10 @@
{
hideById('dataEntryInfor');
hideById('listDiv');
+ showById('mainLinkLbl');
jQuery.getJSON( "anonymousPrograms.action",{},
- function( json )
+ function( json )
{
clearListById('searchObjectId');
clearListById('compulsoryDE');
@@ -301,10 +302,11 @@
$( '#dataEntryFormDiv' ).load( "dataentryform.action",
{
programStageInstanceId: programStageInstanceId
- },function( )
+ },function()
{
- var programName = jQuery('#programId option:selected').text();
- programName += ' - ' + i18n_report_date + ' : ' + jQuery('#incidentDate').val();
+ jQuery('#inputCriteriaDiv').remove();
+ hideById('mainLinkLbl');
+ var programName = jQuery('#programId option:selected').text();
var programStageId = jQuery('#programId option:selected').attr('psid');
jQuery('.stage-object-selected').attr('psid',programStageId);
setInnerHTML('programName', programName );
@@ -315,7 +317,6 @@
else{
disableCompletedButton( false );
}
-
hideById('loaderDiv');
showById('dataEntryInfor');
showById('entryFormContainer');
@@ -324,7 +325,8 @@
function backEventList()
{
- hideById('dataEntryInfor');
+ hideById('dataEntryInfor');
+ showById('mainLinkLbl');
showById('selectDiv');
showById('searchDiv');
showById('listDiv');
=== 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-10-05 08:56:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-10-06 13:46:23 +0000
@@ -629,13 +629,11 @@
{
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/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-10-05 07:47:52 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-10-06 13:46:23 +0000
@@ -444,7 +444,7 @@
}
}
-function doComplete()
+function doComplete( isCreateEvent )
{
var flag = false;
jQuery("#dataEntryFormDiv input[name='entryfield'],select[name='entryselect']").each(function(){
@@ -498,9 +498,12 @@
jQuery('#completedList' ).append('<option value="' + programInstanceId + '">' + getInnerHTML('infor_' + programInstanceId ) + '</option>');
}
- selection.enable();
hideLoader();
hideById('contentDiv');
+
+ if( isCreateEvent ){
+ showAddEventForm();
+ }
});
}
}
=== 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-06 05:12:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-10-06 13:46:23 +0000
@@ -279,7 +279,7 @@
orgunit_name = Organisation unit name
days_since_due_date = Days since due date
scheduling = Scheduling
-schedule_message = Schedule sending message
+schedule_message = Schedule message
intro_schedule_message = At midnight, the system checks if any person\u2019s events are incomplete/scheduled in future and have a relevant message defined before, create messages for each event based on the template message of each program stage and save them. Every day, at a system configurable time, the messages are sent out on SMS.
schedule = Schedule
start = Start
=== 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 04:54:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2012-10-06 13:46:23 +0000
@@ -38,13 +38,13 @@
<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 #if( $program.type=='3' ) disabled #end ></td>
+ <td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true' #if($program.generatedByEnrollmentDate=='true') checked #end #if( $program.type=='3' ) disabled #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><input type="text" id="version" name="version" value="$program.version" class="{validate:{required:true,number:true}}"></td>
<td></td>
</tr>
@@ -54,7 +54,7 @@
<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><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='true' #if( $program.displayProvidedOtherFacility=='true' ) checked #end ></td>
<td></td>
</tr>