dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19354
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8404: Don't save data-value when to click Add new button in anonymous data entry form
------------------------------------------------------------
revno: 8404
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-10-06 21:03:27 +0700
message:
Don't save data-value when to click Add new button in anonymous data entry form
modified:
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/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-10-06 13:46:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-10-06 14:03:27 +0000
@@ -32,7 +32,7 @@
$i18n.getString("program") <em title="$i18n.getString( "required" )" class="required">*</em></label>
</td>
<td>
- <select type="text" id="programId" name="programId" onchange='getDataElements();' class='stage-object-selected'>
+ <select type="text" id="programId" name="programId" onchange='getDataElements();'>
<option value="" psid="" reportDateDes="$i18n.getString('report_date')">[$i18n.getString("please_select")]</option>
#foreach( $program in $programs )
#foreach( $programStage in $program.programStages )
@@ -40,6 +40,7 @@
#end
#end
</select>
+ <input type='hidden' class='stage-object-selected hidden'>
</td>
<td>
<input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'list_all_events' )" onclick='validateSearchEvents( 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 13:46:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-10-06 14:03:27 +0000
@@ -77,6 +77,8 @@
},
function( json )
{
+ jQuery('.stage-object-selected').attr('psid', jQuery('#programId option:selected').attr("psid"));
+
clearListById('searchObjectId');
clearListById('compulsoryDE');
@@ -238,14 +240,14 @@
url: 'searchProgramStageInstances.action',
data: params,
success: function( html ){
- hideById('loaderDiv');
hideById('dataEntryInfor');
setInnerHTML( 'listDiv', html );
var searchInfor = (listAll) ? i18n_list_all_events : i18n_search_events_by_dataelements;
setInnerHTML( 'searchInforTD', searchInfor);
-
+
showById('listDiv');
+ hideById('loaderDiv');
}
});
}