dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41842
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21357: tracker-capture: check program stage for showing (or not) due date
------------------------------------------------------------
revno: 21357
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-12-07 14:13:01 +0100
message:
tracker-capture: check program stage for showing (or not) due date
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.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-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2015-12-04 16:24:25 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2015-12-07 13:13:01 +0000
@@ -84,7 +84,7 @@
<!-- event dates/scheduling begin -->
<div class="row" ng-if="(displayCustomForm !== 'TABLE') && !currentStage.periodType">
- <div class="col-md-6">
+ <div ng-class="{true: 'col-md-12', false: 'col-md-6'} [currentStage.hideDueDate]">
{{currentEvent.excecutionDateLabel}}
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
@@ -99,7 +99,7 @@
blur-or-change="saveEventDate()"/>
<span ng-if="invalidDate" class="error">{{'date_required'| translate}}</span>
</div>
- <div class="col-md-6">
+ <div class="col-md-6" ng-if="!currentStage.hideDueDate">
<span ng-if="currentEvent.eventDate || currentEvent.status === 'SKIPPED' || currentEvent.dueDate">
{{'due_date'| translate}}
</span>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2015-12-04 12:23:53 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2015-12-07 13:13:01 +0000
@@ -317,7 +317,7 @@
var p = d.promise();
dhis2.tc.store.get('programStages', programStage.id).done(function(obj) {
if(!obj || obj.version !== programStage.version) {
- promise = promise.then( getD2Object( programStage.id, 'programStages', '../api/programStages', 'fields=id,name,sortOrder,version,dataEntryForm[id,name,style,htmlCode,format],captureCoordinates,blockEntryForm,autoGenerateEvent,allowGenerateNextVisit,generatedByEnrollmentDate,remindCompleted,excecutionDateLabel,minDaysFromStart,repeatable,openAfterEnrollment,standardInterval,periodType,reportDateToUse,programStageSections[id,name,programStageDataElements[dataElement[id]]],programStageDataElements[displayInReports,allowProvidedElsewhere,allowFutureDate,compulsory,dataElement[id,code,name,description,formName,valueType,optionSetValue,optionSet[id]]]', 'idb' ) );
+ promise = promise.then( getD2Object( programStage.id, 'programStages', '../api/programStages', 'fields=id,name,sortOrder,version,dataEntryForm[id,name,style,htmlCode,format],captureCoordinates,blockEntryForm,autoGenerateEvent,allowGenerateNextVisit,generatedByEnrollmentDate,remindCompleted,hideDueDate,excecutionDateLabel,minDaysFromStart,repeatable,openAfterEnrollment,standardInterval,periodType,reportDateToUse,programStageSections[id,name,programStageDataElements[dataElement[id]]],programStageDataElements[displayInReports,allowProvidedElsewhere,allowFutureDate,compulsory,dataElement[id,code,name,description,formName,valueType,optionSetValue,optionSet[id]]]', 'idb' ) );
}
d.resolve();
});