dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42138
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21526: tracker-capture: print default and custom registration forms
------------------------------------------------------------
revno: 21526
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-12-24 12:47:36 +0100
message:
tracker-capture: print default and custom registration forms
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/enrollment-dates-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html
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/styles/style.css
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.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/registration/default-registration-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2015-12-14 10:14:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2015-12-24 11:47:36 +0000
@@ -158,12 +158,14 @@
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
style="width:75%;"
ng-required="attribute.mandatory || attribute.unique"/>
- <a href ng-class="{true: 'disable-clicks', false: ''} [editingDisabled]" ng-click="getTrackerAssociate(attribute, selectedTei[attribute.id])" title="{{'add'| translate}} {{attribute.name}}">
- <i class="fa fa-external-link fa-2x vertical-center"></i>
- </a>
- <a href ng-if="selectedTei[attribute.id]" ng-class="{true: 'disable-clicks', false: ''} [editingDisabled]" ng-click="selectedTei[attribute.id] = null" title="{{'add'| translate}} {{attribute.name}}">
- <i class="fa fa-trash-o fa-2x vertical-center"></i>
- </a>
+ <span class="hideInPrint">
+ <a href ng-class="{true: 'disable-clicks', false: ''} [editingDisabled]" ng-click="getTrackerAssociate(attribute, selectedTei[attribute.id])" title="{{'add'| translate}} {{attribute.name}}">
+ <i class="fa fa-external-link fa-2x vertical-center"></i>
+ </a>
+ <a href ng-if="selectedTei[attribute.id]" ng-class="{true: 'disable-clicks', false: ''} [editingDisabled]" ng-click="selectedTei[attribute.id] = null" title="{{'add'| translate}} {{attribute.name}}">
+ <i class="fa fa-trash-o fa-2x vertical-center"></i>
+ </a>
+ </span>
</span>
<span ng-switch-default>
<input type="text"
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/enrollment-dates-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/enrollment-dates-form.html 2015-09-11 15:16:03 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/enrollment-dates-form.html 2015-12-24 11:47:36 +0000
@@ -9,18 +9,27 @@
</tr>
<tr>
<td>
+ {{'program' | translate}}
+ </td>
+ <td>
+ <input type="text" class="form-control" value={{selectedProgram.name}} ng-disabled="true"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
{{selectedProgram.enrollmentDateLabel}}
</td>
<td>
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
name="enrollmentDate"
- class="form-control"
+ class="form-control hideInPrint"
d2-date
ng-model="selectedEnrollment.enrollmentDate"
max-date="selectedProgram.selectEnrollmentDatesInFuture ? '' : 0"
min-date=""
ng-required="true"/>
+ <input type="text" class="form-control not-for-screen"/>
<span ng-show="outerForm.submitted && outerForm.enrollmentDate.$invalid" class="error">{{'required'| translate}}</span>
</td>
</tr>
@@ -32,11 +41,12 @@
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
name="incidentDate"
- class="form-control"
+ class="form-control hideInPrint"
d2-date
max-date="selectedProgram.selectIncidentDatesInFuture ? '' : 0"
min-date=""
ng-model="selectedEnrollment.incidentDate"/>
+ <input type="text" class="form-control not-for-screen"/>
</td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2015-12-16 09:17:18 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2015-12-24 11:47:36 +0000
@@ -44,7 +44,7 @@
</div>
<!-- default registration form ends -->
- <div ng-if="formEmpty && outerForm.submitted">
+ <div class="hideInPrint" ng-if="formEmpty && outerForm.submitted">
<div class="alert alert-warning">{{'form_is_empty_fill_at_least_one'| translate}}</div>
</div>
@@ -58,7 +58,7 @@
<button type="button" class="btn btn-default" ng-click="showNewEnrollment()">{{'cancel'| translate}}</button>
</div>
- <div class="vertical-spacing" ng-if="registrationMode === 'REGISTRATION'">
+ <div class="vertical-spacing hideInPrint" ng-if="registrationMode === 'REGISTRATION'">
<button type="button" class="btn btn-primary" ng-click="registerEntity('DASHBOARD')">{{'save_and_continue'| translate}}</button>
<button type="button" class="btn btn-success small-horizonal-spacing" ng-click="registerEntity('SELF')">{{'save_and_add_new'| translate}}</button>
<button type="button" class="btn btn-primary" onclick="javascript:window.print()">{{'print_form'| translate}}</button>
@@ -68,7 +68,7 @@
</form>
<!--registration form ends -->
- <div ng-if="warningMessages.length > 0" style="margin-top:18px" ng-class="{true: 'col-sm-4'} [registrationMode === 'REGISTRATION']">
+ <div class="hideInPrint" ng-if="warningMessages.length > 0" style="margin-top:18px" ng-class="{true: 'col-sm-4'} [registrationMode === 'REGISTRATION']">
<div ng-include="'views/warnings.html'"></div>
</div>
=== 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-23 08:56:16 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2015-12-24 11:47:36 +0000
@@ -287,7 +287,7 @@
return $.ajax( {
url: '../api/programs.json',
type: 'GET',
- data: 'fields=id,name,type,version,displayFrontPageList,dataEntryMethod,enrollmentDateLabel,incidentDateLabel,displayIncidentDate,ignoreOverdueEvents,selectEnrollmentDatesInFuture,selectIncidentDatesInFuture,onlyEnrollOnce,externalAccess,displayOnAllOrgunit,registration,relationshipText,relationshipFromA,relatedProgram[id,name],relationshipType[id,name],trackedEntity[id,name,description],userRoles[id,name],organisationUnits[id,name],userRoles[id,name],programStages[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]]]],programTrackedEntityAttributes[displayInList,mandatory,allowFutureDate,trackedEntityAttribute[id,unique]]&paging=false&filter=id:in:' + ids
+ data: 'fields=id,name,type,version,displayFrontPageList,dataEntryMethod,enrollmentDateLabel,incidentDateLabel,displayIncidentDate,ignoreOverdueEvents,selectEnrollmentDatesInFuture,selectIncidentDatesInFuture,onlyEnrollOnce,externalAccess,displayOnAllOrgunit,registration,dataEntryForm[id,name,style,htmlCode,format],relationshipText,relationshipFromA,relatedProgram[id,name],relationshipType[id,name],trackedEntity[id,name,description],userRoles[id,name],organisationUnits[id,name],userRoles[id,name],programStages[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]]]],programTrackedEntityAttributes[displayInList,mandatory,allowFutureDate,trackedEntityAttribute[id,unique]]&paging=false&filter=id:in:' + ids
}).done( function( response ){
if(response.programs){
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2015-12-17 16:15:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2015-12-24 11:47:36 +0000
@@ -14,6 +14,27 @@
.not-for-screen {
display: block;
}
+ body, html {
+ width: 100% !important;
+ height: auto !important;
+ }
+
+ ::-webkit-input-placeholder { /* WebKit browsers */
+ color: white !important;
+ }
+ :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
+ color: white !important;
+ }
+ ::-moz-placeholder { /* Mozilla Firefox 19+ */
+ color: white !important;
+ }
+ :-ms-input-placeholder { /* Internet Explorer 10+ */
+ color: white !important;
+ }
+
+ .select2-default {
+ color: #f00 !important;
+ }
}
h1 {
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html 2015-12-23 08:56:16 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html 2015-12-24 11:47:36 +0000
@@ -16,7 +16,7 @@
});
</script>
-<span id="showLeftBar">
+<span id="showLeftBar" class="hideInPrint">
<a href="javascript:dhis2.leftBar.showAnimated()" title="$i18n.getString('show_menu' )"><i class="fa fa-arrow-right leftBarIcon"></i></a>
</span>
@@ -59,18 +59,18 @@
<!--- selected org unit ends -->
<!--- search and registration menu begins -->
- <div class="row small-vertical-spacing not-for-screen">
+ <!--<div class="row small-vertical-spacing not-for-screen hideInPrint">
<div class="col-sm-6 col-md-4">
<h4>{{orgUnitLabel}}</h4>
</div>
<div class="col-sm-6 col-md-4">
<input type="text" class="form-control" ng-disabled='true' value="{{selectedOrgUnit.name}}">
</div>
- </div>
+ </div>-->
<div class="row">
<!-- program selection begins -->
- <div class="col-md-4 small-vertical-spacing">
+ <div class="col-md-4 small-vertical-spacing hideInPrint">
<ui-select ng-model="model.selectedProgram"
theme="select2"
on-select="getProgramAttributes(model.selectedProgram)"
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-12-15 15:26:01 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-12-24 11:47:36 +0000
@@ -557,12 +557,12 @@
newInputField = '<input type="text" ' +
' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >' +
- '<a href ng-class="{true: \'disable-clicks\', false: \'\'} [editingDisabled]" ng-click="getTrackerAssociate(attributesById.' + attId + ', selectedTei.' + attId + ')" title="{{\'add\' | translate}} {{attributesById.' + attId + '.name}}" ' +
+ '<span class="hideInPrint"><a href ng-class="{true: \'disable-clicks\', false: \'\'} [editingDisabled]" ng-click="getTrackerAssociate(attributesById.' + attId + ', selectedTei.' + attId + ')" title="{{\'add\' | translate}} {{attributesById.' + attId + '.name}}" ' +
'<i class="fa fa-external-link fa-2x vertical-center"></i> ' +
'</a> ' +
'<a href ng-if="selectedTei.' + attId + '" ng-class="{true: \'disable-clicks\', false: \'\'} [editingDisabled]" ng-click="selectedTei.' + attId + ' = null" title="{{\'remove\' | translate}} {{attributesById.' + attId + '.name}}" ' +
'<i class="fa fa-trash-o fa-2x vertical-center"></i> ' +
- '</a>';
+ '</a></span>';
}
else if (att.valueType === "LONG_TEXT") {
newInputField = '<textarea row ="3" ' +