dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42774
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21825: Optimised the code for presenting the audit icon on the input fields
------------------------------------------------------------
revno: 21825
committer: jijukjose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-01-27 18:55:43 +0100
message:
Optimised the code for presenting the audit icon on the input fields
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.controllers.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js
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-event-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-01-13 11:06:07 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2016-01-27 17:55:43 +0000
@@ -469,4 +469,8 @@
.audit-icon {
margin-left: 5%;
display: inline-block;
+}
+
+.form-narrow-column {
+ width: 80px;
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-01-15 15:44:16 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2016-01-27 17:55:43 +0000
@@ -1,14 +1,16 @@
<div ng-if='!selectedProgramStage.programStageSections.length'>
<div ng-include="'views/event-details.html'"></div>
<table class="dhis2-list-table-striped">
- <thead>
+ <thead>
<tr>
<th>
{{'data_element'| translate}}
</th>
<th>
{{'value'| translate}}
- </th>
+ </th>
+ <th class="form-narrow-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ </th>
</tr>
</thead>
<tbody>
@@ -19,28 +21,24 @@
<td >
<ng-form name="innerForm">
<div ng-if="prStDes[eventGridColumn.id].dataElement.optionSetValue">
- <div ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length >= 7">
- <span>
- <ui-select ng-model="currentEvent[eventGridColumn.id]"
+ <div ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length >= 7">
+ <ui-select ng-model="currentEvent[eventGridColumn.id]"
theme="select2"
ng-required={{eventGridColumn.compulsory}}
name="foo"
input-field-id={{eventGridColumn.id}}
ng-disabled="assignedFields[eventGridColumn.id]"
on-select="saveDatavalue()"
- style="width:85%;">
- <ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
- <ui-select-choices repeat="option.name as option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
- <span ng-bind-html="option.name | highlight: $select.search"></span>
- </ui-select-choices>
- </ui-select>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
- </div>
+ style="width:100%;">
+ <ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
+ <ui-select-choices repeat="option.name as option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
+ <span ng-bind-html="option.name | highlight: $select.search"></span>
+ </ui-select-choices>
+ </ui-select>
+ </div>
<div ng-if="selectedProgram.dataEntryMethod && optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length < 7">
<label>
- <span>
- <input type="radio"
+ <input type="radio"
name="foo"
input-field-id={{eventGridColumn.id}}
ng-change="saveDatavalue()"
@@ -48,13 +46,10 @@
ng-disabled="assignedFields[eventGridColumn.id]"
ng-model="currentEvent[eventGridColumn.id]"
value=""> {{'no_value' | translate}}
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
<br>
</label>
<label ng-repeat="option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options">
- <span>
- <input type="radio"
+ <input type="radio"
name={{eventGridColumn.id}}
input-field-id={{eventGridColumn.id}}
ng-change="saveDatavalue()"
@@ -62,16 +57,13 @@
ng-disabled="assignedFields[eventGridColumn.id]"
ng-model="currentEvent[eventGridColumn.id]"
value={{option.name}}> {{option.name}}<br>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</label>
</div>
</div>
<div ng-if="!prStDes[eventGridColumn.id].dataElement.optionSetValue" ng-switch="eventGridColumn.valueType">
<div ng-switch-when="NUMBER">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{eventGridColumn.valueType}}
ng-model="currentEvent[eventGridColumn.id]"
@@ -80,13 +72,10 @@
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{eventGridColumn.valueType}}
ng-model="currentEvent[eventGridColumn.id]"
@@ -95,13 +84,11 @@
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ class="form-control"/>
</span>
</div>
<div ng-switch-when="INTEGER_POSITIVE">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{eventGridColumn.valueType}}
ng-model="currentEvent[eventGridColumn.id]"
@@ -110,13 +97,10 @@
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER_NEGATIVE">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{eventGridColumn.valueType}}
ng-model="currentEvent[eventGridColumn.id]"
@@ -125,13 +109,10 @@
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER_ZERO_OR_POSITIVE">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{eventGridColumn.valueType}}
ng-model="currentEvent[eventGridColumn.id]"
@@ -140,41 +121,32 @@
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="TEXT">
- <span>
- <input type="text"
+ <input type="text"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="LONG_TEXT">
- <span>
- <textarea rows="3"
+ <textarea rows="3"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit">
+ class="form-control">
</textarea>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</div>
<div ng-switch-when="BOOLEAN" class="form-control">
<label class="radio-inline">
- <span>
- <input type="radio"
+ <input type="radio"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
@@ -182,12 +154,9 @@
ng-change="saveDatavalue()"
value="">
{{'no_value'| translate}}
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</label>
<label class="radio-inline">
- <span>
- <input type="radio"
+ <input type="radio"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
@@ -195,12 +164,9 @@
ng-change="saveDatavalue()"
value="true">
{{'yes'| translate}}
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</label>
<label class="radio-inline">
- <span>
- <input type="radio"
+ <input type="radio"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
@@ -208,13 +174,10 @@
ng-change="saveDatavalue()"
value="false">
{{'no'| translate}}
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</label>
</div>
<div ng-switch-when="DATE">
- <span>
- <input type="text"
+ <input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
d2-date
max-date="prStDes[eventGridColumn.id].allowFutureDate ? '' : 0"
@@ -225,13 +188,10 @@
name="foo"
input-field-id={{eventGridColumn.id}}
blur-or-change="saveDatavalue()"
- class="form-control input-with-audit">
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control">
</div>
<div ng-switch-when="DATETIME">
- <span>
- <input type="text"
+ <input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
d2-date
max-date="prStDes[eventGridColumn.id].allowFutureDate ? '' : 0"
@@ -241,21 +201,15 @@
name="foo"
input-field-id={{eventGridColumn.id}}
style="width:85%;"/>
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</div>
<div ng-switch-when="TRUE_ONLY">
- <span>
- <input type="checkbox"
+ <input type="checkbox"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
name="foo"
input-field-id={{eventGridColumn.id}}
ng-change="saveDatavalue()" />
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
-
</div>
<div ng-switch-when="FILE_RESOURCE">
<div class="input-group">
@@ -290,22 +244,22 @@
</div>
</div>
<div ng-switch-default>
- <span>
- <input type="text"
+ <input type="text"
ng-model="currentEvent[eventGridColumn.id]"
ng-required={{eventGridColumn.compulsory}}
ng-disabled="assignedFields[eventGridColumn.id]"
name="foo"
input-field-id={{eventGridColumn.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit">
- <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control">
</div>
</div>
<div ng-messages="innerForm.foo.$error" ng-if="interacted(innerForm.foo)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
- </div>
- </ng-form>
+ </div>
+ </ng-form>
+ </td>
+ <td class="form-narrow-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <d2-audit dataelement-id="{{prStDes[eventGridColumn.id].dataElement.id}}" dataelement-name="{{prStDes[eventGridColumn.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</td>
</tr>
</tbody>
@@ -323,8 +277,7 @@
<div class="vertical-spacing" ng-if="!section.programStageDataElements || section.programStageDataElements.length === 0">
<div class="alert alert-warning">{{'section'| translate}} {{section.name}} {{'has_no_dataelements'| translate}}</div>
</div>
-
- <table class="dhis2-list-table-striped">
+ <table class="dhis2-list-table-striped">
<thead>
<tr>
<th>
@@ -332,7 +285,10 @@
</th>
<th>
{{'value'| translate}}
- </th>
+ </th>
+ <th class="form-narrow-column" ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+
+ </th>
</tr>
</thead>
<tbody>
@@ -341,7 +297,7 @@
{{prStDes[de.dataElement.id].dataElement.formName ? prStDes[de.dataElement.id].dataElement.formName : prStDes[de.dataElement.id].dataElement.name}}
<span ng-if="prStDes[de.dataElement.id].compulsory" class="required">*</span>
</td>
- <td >
+ <td>
<ng-form name="innerForm">
<div ng-if="prStDes[de.dataElement.id].dataElement.optionSetValue">
<span ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length >= 7">
@@ -353,19 +309,17 @@
name="foo"
input-field-id={{de.dataElement.id}}
on-select="saveDatavalue()"
- style="width:85%;">
+ style="width:100%;">
<ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
<ui-select-choices repeat="option.name as option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
<span ng-bind-html="option.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</span>
</span>
<span ng-if="selectedProgram.dataEntryMethod && optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length < 7">
<label>
- <span>
- <input type="radio"
+ <input type="radio"
name={{de.dataElement.id}}
input-field-id={{de.dataElement.id}}
ng-change="saveDatavalue()"
@@ -373,14 +327,11 @@
ng-disabled="assignedFields[de.dataElement.id]"
ng-model="currentEvent[de.dataElement.id]"
value="">{{'no_value' | translate}}
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
<br>
</label><br>
<span ng-repeat="option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options">
<label>
- <span>
- <input type="radio"
+ <input type="radio"
name={{de.dataElement.id}}
input-field-id={{de.dataElement.id}}
ng-change="saveDatavalue()"
@@ -388,8 +339,6 @@
ng-disabled="assignedFields[de.dataElement.id]"
ng-model="currentEvent[de.dataElement.id]"
value={{option.name}}> {{option.name}}
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
<br>
</label><br>
</span>
@@ -397,8 +346,7 @@
</div>
<div ng-if="!prStDes[de.dataElement.id].dataElement.optionSetValue" ng-switch="prStDes[de.dataElement.id].dataElement.valueType">
<div ng-switch-when="NUMBER">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
ng-model="currentEvent[de.dataElement.id]"
@@ -407,13 +355,10 @@
name="foo"
input-field-id={{de.dataElement.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
ng-model="currentEvent[de.dataElement.id]"
@@ -421,14 +366,11 @@
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
- ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ ng-blur="saveDatavalue()"
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER_POSITIVE">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
ng-model="currentEvent[de.dataElement.id]"
@@ -436,14 +378,11 @@
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
- ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ ng-blur="saveDatavalue()"
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER_NEGATIVE">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
ng-model="currentEvent[de.dataElement.id]"
@@ -451,14 +390,11 @@
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
- ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ ng-blur="saveDatavalue()"
+ class="form-control"/>
</div>
<div ng-switch-when="INTEGER_ZERO_OR_POSITIVE">
- <span>
- <input type="number"
+ <input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
ng-model="currentEvent[de.dataElement.id]"
@@ -466,41 +402,32 @@
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
- ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ ng-blur="saveDatavalue()"
+ class="form-control"/>
</div>
<div ng-switch-when="TEXT">
- <span>
- <input type="text"
+ <input type="text"
ng-model="currentEvent[de.dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
- ng-blur="saveDatavalue()"
- class="form-control input-with-audit">
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ ng-blur="saveDatavalue()"
+ class="form-control"/>
</div>
<div ng-switch-when="LONG_TEXT">
- <span>
- <textarea rows="3"
+ <textarea rows="3"
ng-model="currentEvent[de.dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit">
- </textarea>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
+ </textarea>
</div>
- <span>
<div ng-switch-when="BOOLEAN">
- <span class="form-control input-with-audit">
+ <span class="form-control">
<label class="radio-inline">
<input type="radio"
ng-model="currentEvent[de.dataElement.id]"
@@ -532,13 +459,11 @@
{{'no'| translate}}
</label>
</span>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div ng-switch-when="DATE">
- <span>
- <input type="text"
+ <input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
d2-date
max-date="prStDes[de.dataElement.id].allowFutureDate ? '' : 0"
@@ -548,14 +473,11 @@
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
- blur-or-change="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ blur-or-change="saveDatavalue()"
+ class="form-control"/>
</div>
<div ng-switch-when="DATETIME">
- <span>
- <input type="text"
+ <input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
d2-date
max-date="prStDes[de.dataElement.id].allowFutureDate ? '' : 0"
@@ -566,21 +488,16 @@
name="foo"
input-field-id={{de.dataElement.id}}
blur-or-change="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
<div ng-switch-when="TRUE_ONLY">
- <span>
- <input type="checkbox"
+ <input type="checkbox"
ng-model="currentEvent[de.dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
ng-change="saveDatavalue()" />
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</div>
<div ng-switch-when="FILE_RESOURCE">
<div class="input-group">
@@ -615,17 +532,14 @@
</div>
</div>
<div ng-switch-default>
- <span>
- <input type="text"
+ <input type="text"
ng-model="currentEvent[de.dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="assignedFields[de.dataElement.id]"
name="foo"
input-field-id={{de.dataElement.id}}
ng-blur="saveDatavalue()"
- class="form-control input-with-audit"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
+ class="form-control"/>
</div>
</div>
<div ng-messages="innerForm.foo.$error" ng-if="interacted(innerForm.foo)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
@@ -635,6 +549,9 @@
</div>
</ng-form>
</td>
+ <td ng-if="currentEvent.event && currentEvent.event !== 'SINGLE_EVENT'">
+ <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ </td>
</tr>
</tbody>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2016-01-15 21:03:59 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2016-01-27 17:55:43 +0000
@@ -6,6 +6,8 @@
</th>
<th class="" ng-bind="valueLabel">
</th>
+ <th class="form-narrow-column" ng-if="currentEvent.event">
+ </th>
<th class="form-narrow-column" ng-if="allowProvidedElsewhereExists[currentStage.id]" ng-bind="providedElsewhereLabel">
</th>
</tr>
@@ -34,18 +36,17 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
name="foo"
on-select="saveDatavalue(prStDe, innerForm.foo)"
- style="width:85%;">
+ ng-style="{'width': '100%'}">
<ui-select-match allow-clear="true" ng-class="getInputNotifcationClass(prStDe.dataElement.id, true)" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
<ui-select-choices repeat="option.name as option in optionSets[prStDe.dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
<span ng-bind-html="option.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div ng-if="selectedProgram.dataEntryMethod && optionSets[prStDe.dataElement.optionSet.id].options.length < 7">
<label>
<input type="radio"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
name={{prStDe.dataElement.id}}
ng-required={{prStDe.compulsory}}
@@ -53,13 +54,12 @@
ng-model="currentEvent[prStDe.dataElement.id]"
ng-change="saveDatavalue(prStDe, innerForm.foo)"
value=""> {{'no_value' | translate}}
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
<br>
</label><br>
<span ng-repeat="option in optionSets[prStDe.dataElement.optionSet.id].options">
<label>
<input type="radio"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
name={{prStDe.dataElement.id}}
ng-required={{prStDe.compulsory}}
@@ -67,7 +67,6 @@
ng-model="currentEvent[prStDe.dataElement.id]"
ng-change="saveDatavalue(prStDe, innerForm.foo)"
value={{option.name}}> {{option.name}}
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</label><br>
</span>
</div>
@@ -81,7 +80,7 @@
<div class="hideInPrint">
<input type="number"
number-type={{prStDe.dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDe.dataElement.id]"
d2-number-validator
@@ -89,7 +88,6 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -99,7 +97,7 @@
<div class="hideInPrint">
<input type="number"
number-type={{prStDe.dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDe.dataElement.id]"
d2-number-validator
@@ -107,7 +105,6 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -117,7 +114,7 @@
<div class="hideInPrint">
<input type="number"
number-type={{prStDe.dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
ng-model="currentEvent[prStDe.dataElement.id]"
d2-number-validator
@@ -125,7 +122,6 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -135,7 +131,7 @@
<div class="hideInPrint">
<input type="number"
number-type={{prStDe.dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDe.dataElement.id]"
d2-number-validator
@@ -143,7 +139,6 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -153,7 +148,7 @@
<div class="hideInPrint">
<input type="number"
number-type={{prStDe.dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDe.dataElement.id]"
d2-number-validator
@@ -161,7 +156,6 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -171,14 +165,13 @@
<div class="hideInPrint">
<textarea rows="3"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo">
</textarea>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<textarea rows="3" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}></textarea>
@@ -188,13 +181,12 @@
<div class="hideInPrint">
<input type="text"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -204,7 +196,6 @@
<div class="hideInPrint">
<span>
<dhis2-radio-button
- class="input-with-audit"
dh-required="prStDe.compulsory"
dh-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id] === true"
dh-value="currentEvent[prStDe.dataElement.id]"
@@ -214,7 +205,6 @@
dh-id="prStDe.dataElement.id"
dh-click="saveDataValueForRadio(prStDe, currentEvent, value)">
</dhis2-radio-button>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</span>
</div>
<div class="not-for-screen">
@@ -229,14 +219,13 @@
d2-date
d2-date-validator
max-date="prStDe.allowFutureDate ? '' : 0"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
blur-or-change="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -245,13 +234,12 @@
<div ng-switch-when="TRUE_ONLY">
<div class="hideInPrint">
<input type="checkbox"
- class="form-control-checkbox input-with-audit"
+ class="form-control-checkbox"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-change="saveDatavalue(prStDe, innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" ng-checked={{currentEvent[prStDe.dataElement.id]}}>
@@ -269,13 +257,12 @@
multiple
on-remove="saveMultiSelectState($item,currentEvent,prStDe,false)"
on-select="saveMultiSelectState($item,currentEvent,prStDe,true)"
- style="width:85%; overflow:visible">
+ ng-style="{'width': '100%'}">
<ui-select-match allow-clear="true" ng-class={{getInputNotifcationClass(prStDe.dataElement.id,false)}} class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}" >{{$item.dataElement.formName ? $item.dataElement.formName : $item.dataElement.name }}</ui-select-match>
<ui-select-choices repeat="prStDe.dataElement as prStDe in currentStage.multiSelectGroups[prStDe.dataElement.id].dataElements | filter: $select.search | limitTo:maxOptionSize">
<span ng-bind-html="prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -320,14 +307,13 @@
<div ng-switch-default>
<div class="hideInPrint">
<input type="text"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][prStDe.dataElement.id]"
ng-blur="saveDatavalue(prStDe, innerForm.foo)"
- name="foo"/>
- <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ name="foo">
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDe.dataElement.id]}}>
@@ -347,6 +333,9 @@
</div>
</ng-form>
</td>
+ <td ng-if="currentEvent.event" class="form-narrow-column">
+ <d2-audit dataelement-id="{{prStDe.dataElement.id}}" dataelement-name="{{prStDe.dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ </td>
<td class="form-narrow-column" ng-if="allowProvidedElsewhereExists[currentStage.id]">
<div ng-show="prStDe.allowProvidedElsewhere">
<span>
@@ -376,6 +365,8 @@
</th>
<th class="" ng-bind="valueLabel">
</th>
+ <th class="form-narrow-column" ng-if="currentEvent.event">
+ </th>
<th class="form-narrow-column" ng-if="allowProvidedElsewhereExists[currentStage.id]" ng-bind="providedElsewhereLabel">
</th>
</tr>
@@ -405,19 +396,19 @@
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
name="foo"
on-select="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
- style="width:85%;">
+ ng-style="{'width':'100%'}"/>
<ui-select-match allow-clear="true" ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,true, currentEvent)" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
<ui-select-choices repeat="option.name as option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
<span ng-bind-html="option.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+
</div>
<div ng-if="selectedProgram.dataEntryMethod && optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length < 7">
<label>
<span>
<input type="radio"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
name={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}
ng-required={{prStDes[de.dataElement.id].compulsory}}
@@ -425,14 +416,13 @@
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-change="saveDatavalue(prStDes[de.dataElement.id])"
value=""> {{'no_value' | translate}}<br>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</span>
</label><br>
<span ng-repeat="option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options">
<label>
<input type="radio"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
name={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}
ng-required={{prStDes[de.dataElement.id].compulsory}}
@@ -440,7 +430,6 @@
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-change="saveDatavalue(prStDes[de.dataElement.id])"
value={{option.name}}> {{option.name}}
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</label><br>
</span>
</div>
@@ -452,19 +441,16 @@
<div ng-if="!prStDes[de.dataElement.id].dataElement.optionSetValue" ng-switch="prStDes[de.dataElement.id].dataElement.valueType">
<div ng-switch-when="NUMBER">
<div class="hideInPrint">
- <span>
<input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
- </span>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -475,14 +461,13 @@
<input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
- name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ name="foo" />
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -493,14 +478,13 @@
<input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -511,14 +495,13 @@
<input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -529,14 +512,13 @@
<input type="number"
d2-number-validator
number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -555,7 +537,6 @@
dh-id="de.dataElement.id"
dh-click="saveDataValueForRadio(prStDes[de.dataElement.id], currentEvent, value)">
</dhis2-radio-button>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<label class="radio-inline"><input type="radio" ng-checked="{{currentEvent[prStDes[de.dataElement.id].dataElement.id] === 'true'}}">{{'yes' | translate}}</label>
@@ -569,14 +550,13 @@
d2-date
d2-date-validator
max-date="prStDes[de.dataElement.id].allowFutureDate ? '' : 0"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
blur-or-change="saveDatavalue(prStDes[de.dataElement.id])"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -585,13 +565,12 @@
<div ng-switch-when="TRUE_ONLY">
<div class="hideInPrint">
<input type="checkbox"
- class="form-control-checkbox input-with-audit"
+ class="form-control-checkbox"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-change="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="checkbox" class="form-control-checkbox" ng-checked={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -600,14 +579,14 @@
<div ng-switch-when="LONG_TEXT">
<div class="hideInPrint">
<textarea rows="3"
- class="form-control input-with-audit"
+ class="form-control"
+
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"></textarea>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<textarea rows="3" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}></textarea>
@@ -616,14 +595,13 @@
<div ng-switch-when="TEXT">
<div class="hideInPrint">
<input type="text"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -668,14 +646,13 @@
<div ng-switch-default>
<div class="hideInPrint">
<input type="text"
- class="form-control input-with-audit"
+ class="form-control"
ng-class="getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false, currentEvent)"
ng-model="currentEvent[prStDes[de.dataElement.id].dataElement.id]"
ng-required={{prStDes[de.dataElement.id].compulsory}}
ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed || assignedFields[currentEvent.event][de.dataElement.id]"
ng-blur="saveDatavalue(prStDes[de.dataElement.id])"
name="foo"/>
- <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
</div>
<div class="not-for-screen">
<input type="text" class="form-control" value={{currentEvent[prStDes[de.dataElement.id].dataElement.id]}}>
@@ -694,6 +671,9 @@
</div>
</ng-form>
</td>
+ <td ng-if="currentEvent.event">
+ <d2-audit dataelement-id="{{de.dataElement.id}}" dataelement-name="{{prStDes[de.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit>
+ </td>
<td class="form-narrow-column" ng-if="allowProvidedElsewhereExists[currentStage.id]">
<div ng-show="prStDes[de.dataElement.id].allowProvidedElsewhere">
<input type="checkbox"
=== 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 2016-01-27 15:13:53 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html 2016-01-27 17:55:43 +0000
@@ -21,13 +21,12 @@
selected-tei-id={{selectedTei.trackedEntityInstance}}
ng-disabled="editingDisabled"
on-select="teiValueUpdated(selectedTei, attribute.id)"
- style="width:85%;">
+ ng-style="{'width': '100%'}">
<ui-select-match allow-clear="true" class="form-control-ui-select" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
<ui-select-choices repeat="option.name as option in optionSets[attributesById[attribute.id].optionSet.id].options | filter: $select.search | limitTo:maxOptionSize">
<span ng-bind-html="option.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit>
</span>
<span ng-if="!attribute.optionSetValue" ng-switch="attribute.valueType">
@@ -35,7 +34,7 @@
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
name="foo"
- class="form-control input-with-audit"
+ class="form-control"
d2-date
d2-date-validator
max-date="attribute.allowFutureDate ? '' : 0"
@@ -48,12 +47,11 @@
ng-disabled="editingDisabled"
blur-or-change="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit>
</span>
<span ng-switch-when="TRUE_ONLY">
<input type="checkbox"
name="foo"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="selectedTei[attribute.id]"
ng-model-options="{ updateOn: 'default blur', allowInvalid: true }"
d2-attribute-validator
@@ -63,13 +61,11 @@
ng-disabled="editingDisabled"
ng-change="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</span>
<span ng-switch-when="BOOLEAN" class="form-control">
<label class="radio-inline">
<input type="radio"
- class="input-with-audit"
- ng-model="selectedTei[attribute.id]"
+ ng-model="selectedTei[attribute.id]"
d2-attribute-validator
attribute-data={{attribute}}
selected-program-id={{selectedProgram.id}}
@@ -79,7 +75,6 @@
ng-required="attribute.mandatory || attribute.unique"
value="">
{{'no_value'| translate}}
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</label>
<label class="radio-inline">
<input type="radio"
@@ -94,13 +89,11 @@
ng-required="attribute.mandatory || attribute.unique"
value="true">
{{'yes'| translate}}
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</label>
<label class="radio-inline">
<input type="radio"
ng-model="selectedTei[attribute.id]"
- class="input-with-audit"
- d2-attribute-validator
+ d2-attribute-validator
attribute-data={{attribute}}
selected-program-id={{selectedProgram.id}}
selected-tei-id={{selectedTei.trackedEntityInstance}}
@@ -109,13 +102,12 @@
ng-required="attribute.mandatory || attribute.unique"
value="false">
{{'no'| translate}}
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
- </label>
+ </label>
</span>
<span ng-switch-when="NUMBER">
- <input type="number"
+ <input type="number"
name="foo"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="selectedTei[attribute.id]"
ng-model-options="{ updateOn: 'default blur', allowInvalid: true }"
d2-attribute-validator
@@ -127,12 +119,11 @@
ng-disabled="editingDisabled"
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</span>
<span ng-switch-when="EMAIL">
- <input type="email"
+ <input type="email"
name="foo"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="selectedTei[attribute.id]"
ng-model-options="{ updateOn: 'default blur', allowInvalid: true }"
d2-attribute-validator
@@ -142,12 +133,11 @@
ng-disabled="editingDisabled"
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</span>
<span ng-switch-when="LONG_TEXT">
<textarea row="3"
name="foo"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="selectedTei[attribute.id]"
d2-attribute-validator
ng-model-options="{ updateOn: 'default blur', allowInvalid: true }"
@@ -158,12 +148,11 @@
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique">
</textarea>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</span>
<span ng-switch-when="TRACKER_ASSOCIATE">
<input type="text"
name="foo"
- class="form-control-trimmed input-with-audit"
+ class="form-control-trimmed"
ng-model="selectedTei[attribute.id]"
ng-model-options="{ updateOn: 'default blur', allowInvalid: true }"
d2-attribute-validator
@@ -174,7 +163,6 @@
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
style="width:75%;"
ng-required="attribute.mandatory || attribute.unique"/>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
<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>
@@ -187,7 +175,7 @@
<span ng-switch-default>
<input type="text"
name="foo"
- class="form-control input-with-audit"
+ class="form-control"
ng-model="selectedTei[attribute.id]"
ng-model-options="{ updateOn: 'default blur', allowInvalid: true }"
d2-attribute-validator
@@ -197,7 +185,6 @@
ng-disabled="editingDisabled"
ng-blur="teiValueUpdated(selectedTei, attribute.id)"
ng-required="attribute.mandatory || attribute.unique"/>
- <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
</span>
</span>
<div ng-messages="innerForm.foo.$error" ng-if="interacted(innerForm.foo)" class="required hideInPrint" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
@@ -212,5 +199,8 @@
</div>
</ng-form>
</td>
+ <td ng-if="selectedTeiId">
+ <d2-audit dataelement-id="{{attribute.id}}" dataelement-name="{{attribute.name}}" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>
+ </td>
</tr>
</table>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.controllers.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.controllers.js 2016-01-11 11:26:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.controllers.js 2016-01-27 17:55:43 +0000
@@ -82,6 +82,10 @@
}
});
+})
+.controller('InputController', function( $scope) {
+ $scope.inputObj = {isAuditIconPresent:false};
});
+
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-01-18 10:41:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-01-27 17:55:43 +0000
@@ -391,7 +391,8 @@
dataElementName: '@dataelementName',
currentEvent:'@',
type:'@',
- selectedTeiId:'@'
+ selectedTeiId:'@',
+ isAuditIconPresent:'=?'
},
controller:function($scope, $modal) {
if (!$scope.dataElementId) {
@@ -400,11 +401,14 @@
$scope.showAuditIcon = function() {
if ($scope.currentEvent && $scope.currentEvent !== 'SINGLE_EVENT') {
+ $scope.isAuditIconPresent = true;
return true;
}
if ($scope.type === "attribute" && $scope.selectedTeiId) {
+ $scope.isAuditIconPresent = true;
return true;
}
+ $scope.isAuditIconPresent = false;
return false;
}
=== 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 2016-01-15 15:27:38 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2016-01-27 17:55:43 +0000
@@ -383,7 +383,7 @@
attributes['name'] = fieldId;
}
- newInputField = '<span class="hideInPrint"><input type="text" ' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="text" ' +
this.getAttributesAsString(attributes) +
' ng-model="currentEvent.' + fieldId + '"' +
' input-field-id="' + fieldId + '"' +
@@ -394,7 +394,7 @@
' ng-class="getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id,true)"' +
' blur-or-change="saveDatavalue(prStDes.' + fieldId + ')"' +
' class="input-with-audit"' +
- ' ng-required="{{true}}"><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ ' ng-required="{{true}}"><d2-audit is-audit-icon-present="isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else {
fieldId = attributes['id'].substring(4, attributes['id'].length - 1).split("-")[1];
@@ -417,14 +417,14 @@
//check if dataelement has optionset
if (prStDe.dataElement.optionSetValue) {
var optionSetId = prStDe.dataElement.optionSet.id;
- newInputField = '<span class="hideInPrint"><ui-select style="width:80%;" theme="select2" ' + commonInputFieldProperty + ' on-select="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" >' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><ui-select ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" theme="select2" ' + commonInputFieldProperty + ' on-select="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" >' +
'<ui-select-match style="width:100%;" ng-class="getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)" allow-clear="true" placeholder="' + $translate.instant('select_or_search') + '">{{$select.selected.name || $select.selected}}</ui-select-match>' +
'<ui-select-choices ' +
' repeat="option.name as option in optionSets.' + optionSetId + '.options | filter: $select.search | limitTo:maxOptionSize">' +
'<span ng-bind-html="option.name | highlight: $select.search">' +
'</span>' +
'</ui-select-choices>' +
- '</ui-select><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ '</ui-select><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else {
//check data element type and generate corresponding angular input field
@@ -433,31 +433,31 @@
prStDe.dataElement.valueType === "INTEGER_POSITIVE" ||
prStDe.dataElement.valueType === "INTEGER_NEGATIVE" ||
prStDe.dataElement.valueType === "INTEGER_ZERO_OR_POSITIVE") {
- newInputField = '<span class="hideInPrint"><input type="number" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="number" ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" ' +
' d2-number-validator ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
' number-type="' + prStDe.dataElement.valueType + '" ' +
' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + '><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + '><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else if (prStDe.dataElement.valueType === "BOOLEAN") {
- newInputField = '<span class="hideInPrint"><label class="radio-inline"><input type="radio" class="input-with-audit" ng-change="saveDatavalue()" ' + commonInputFieldProperty + ' value="">{{\'no_value\'| translate}}</label>' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><label class="radio-inline"><input type="radio" ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" ng-change="saveDatavalue()" ' + commonInputFieldProperty + ' value="">{{\'no_value\'| translate}}</label>' +
'<label class="radio-inline"><input type="radio" ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' + commonInputFieldProperty + ' value="true">{{\'yes\'| translate}}</label>' +
- '<label class="radio-inline"><input type="radio" ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' + commonInputFieldProperty + ' value="false">{{\'no\'| translate}}</label><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span>' +
+ '<label class="radio-inline"><input type="radio" ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' + commonInputFieldProperty + ' value="false">{{\'no\'| translate}}</label><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span>' +
'<span class="not-for-screen"><label class="radio-inline"><input type="radio" ng-checked="{{\'true\' === currentEvent.' + fieldId + '}}">{{\'yes\'| translate}}</label>' +
'<label class="radio-inline"><input type="radio" ng-checked="{{\'false\' === currentEvent.' + fieldId + '}}">{{\'no\'| translate}}</label></span>';
}
else if (prStDe.dataElement.valueType === "DATE") {
var maxDate = prStDe.allowFutureDate ? '' : 0;
- newInputField = '<span class="hideInPrint"><input type="text" ' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="text" ' +
' placeholder="{{dhis2CalendarFormat.keyDateFormat}}" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
- 'class="input-with-audit"'+
+ ' ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }"'+
' d2-date ' +
' d2-date-validator ' +
' max-date="' + maxDate + '"' +
' blur-or-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + ' ><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + ' ><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
else if (prStDe.dataElement.valueType === "TRUE_ONLY") {
newInputField = '<span class="hideInPrint"><input type="checkbox" ' +
@@ -466,11 +466,11 @@
commonInputFieldProperty + ' ><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="checkbox" ng-checked={{currentEvent.' + fieldId + '}}></span>';
}
else if (prStDe.dataElement.valueType === "LONG_TEXT") {
- newInputField = '<span class="hideInPrint"><textarea row="3" ' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><textarea row="3" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- ' class="input-with-audit" ' +
- commonInputFieldProperty + '></textarea><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><textarea row="3" value={{currentEvent.' + fieldId + '}}></textarea></span>';
+ ' ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }"' +
+ commonInputFieldProperty + '></textarea><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><textarea row="3" value={{currentEvent.' + fieldId + '}}></textarea></span>';
}
else if (prStDe.dataElement.valueType === "FILE_RESOURCE") {
newInputField = '<span class="input-group">\n\
@@ -498,11 +498,11 @@
</span>';
}
else {
- newInputField = '<span class="hideInPrint"><input type="text" ' +
+ newInputField = '<span ng-controller="InputController" class="hideInPrint"><input type="text" ' +
' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
- ' class="input-with-audit"' +
+ ' ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }"' +
' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
- commonInputFieldProperty + ' ><d2-audit dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
+ commonInputFieldProperty + ' ><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="{{prStDes.' + fieldId + '.dataElement.id}}" dataelement-name="{{prStDes[prStDes.' + fieldId + '.dataElement.id].dataElement.name}}" current-event="{{currentEvent.event}}"></d2-audit></span><span class="not-for-screen"><input type="text" value={{currentEvent.' + fieldId + '}}></span>';
}
}
}
@@ -577,23 +577,23 @@
//check if attribute has optionset
if (att.optionSetValue) {
var optionSetId = att.optionSet.id;
- newInputField = '<span><ui-select style="width:85%;" theme="select2" ' + commonInputFieldProperty + ' on-select="teiValueUpdated(selectedTei,\'' + attId + '\')" >' +
+ newInputField = '<span ng-controller="InputController"><ui-select ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" theme="select2" ' + commonInputFieldProperty + ' on-select="teiValueUpdated(selectedTei,\'' + attId + '\')" >' +
'<ui-select-match style="width:100%;" allow-clear="true" placeholder="' + $translate.instant('select_or_search') + '">{{$select.selected.name || $select.selected}}</ui-select-match>' +
'<ui-select-choices ' +
'repeat="option.name as option in optionSets.' + optionSetId + '.options | filter: $select.search | limitTo:maxOptionSize">' +
'<span ng-bind-html="option.name | highlight: $select.search"></span>' +
'</ui-select-choices>' +
- '</ui-select><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit></span>';
+ '</ui-select><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit></span>';
}
else {
//check attribute type and generate corresponding angular input field
if (att.valueType === "NUMBER" ) {
- newInputField = '<span><input type="number" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController"><input type="number" ng-class="{\'input-with-audit\':inputObj.isAuditIconPresent}"' +
' d2-number-validator ' +
' number-type="' + att.valueType + '" ' +
' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >' +
- '<d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>' +
+ '<d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}}></d2-audit>' +
'</span>';
}
else if (att.valueType === "BOOLEAN") {
@@ -608,13 +608,13 @@
'</span></label>';
}
else if (att.valueType === "DATE") {
- newInputField = '<span><input type="text" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController"><input type="text" ng-class="{\'input-with-audit\':inputObj.isAuditIconPresent}"' +
' placeholder="{{dhis2CalendarFormat.keyDateFormat}}" ' +
- ' max-date="' + attMaxDate + '"' + '\'' +
+ ' max-date=" ' + attMaxDate + ' " ' +
' d2-date' +
' blur-or-change="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
commonInputFieldProperty + ' >'+
- '<d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit>'+
+ '<d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit>'+
'</span>';
}
else if (att.valueType === "TRUE_ONLY") {
@@ -623,14 +623,14 @@
commonInputFieldProperty + ' ><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
else if (att.valueType === "EMAIL") {
- newInputField = '<span><input type="email" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController"><input type="email" ng-class="{\'input-with-audit\':inputObj.isAuditIconPresent}"' +
' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
- commonInputFieldProperty + ' ><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
+ commonInputFieldProperty + ' ><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
else if (att.valueType === "TRACKER_ASSOCIATE") {
- newInputField = '<span><input type="text" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController"><input type="text" ng-class="{\'input-with-audit\':inputObj.isAuditIconPresent}"' +
' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
- commonInputFieldProperty + ' ><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>' +
+ commonInputFieldProperty + ' ><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>' +
'<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> ' +
@@ -644,9 +644,9 @@
commonInputFieldProperty + ' ></textarea><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
else {
- newInputField = '<span><input class="input-with-audit" type="text" ' +
+ newInputField = '<span ng-controller="InputController"><input ng-style="{\'width\' : inputObj.isAuditIconPresent ? \'85%\' : \'100%\' }" type="text" ' +
' ng-blur="teiValueUpdated(selectedTei,\'' + attId + '\')" ' +
- commonInputFieldProperty + '><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
+ commonInputFieldProperty + '><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
}
}
@@ -666,7 +666,7 @@
if (programId === 'enrollmentDate') {
fieldName = 'dateOfEnrollment';
var enMaxDate = trackedEntityForm.selectEnrollmentDatesInFuture ? '' : 0;
- newInputField = '<span><input type="text" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController"><input type="text" ng-class="{\'input-with-audit\':inputObj.isAuditIconPresent}"' +
' name="' + fieldName + '"' +
' element-id="' + i + '"' +
this.getAttributesAsString(attributes) +
@@ -676,12 +676,12 @@
' ng-disabled="\'' + target + '\' === \'PROFILE\'"' +
' d2-date' +
' max-date="' + enMaxDate + '"' +
- ' ng-required="true"><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
+ ' ng-required="true"><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
if (programId === 'dateOfIncident' && trackedEntityForm.displayIncidentDate) {
fieldName = 'dateOfIncident';
var inMaxDate = trackedEntityForm.selectIncidentDatesInFuture ? '' : 0;
- newInputField = '<span><input type="text" class="input-with-audit"' +
+ newInputField = '<span ng-controller="InputController"><input type="text" ng-class="{\'input-with-audit\':inputObj.isAuditIconPresent}"' +
' name="' + fieldName + '"' +
' element-id="' + i + '"' +
this.getAttributesAsString(attributes) +
@@ -690,7 +690,7 @@
' ng-model="selectedEnrollment.dateOfIncident" ' +
' ng-disabled="\'' + target + '\' === \'PROFILE\'"' +
' d2-date ' +
- ' max-date="' + inMaxDate + '"><d2-audit dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
+ ' max-date="' + inMaxDate + '"><d2-audit is-audit-icon-present="inputObj.isAuditIconPresent" dataelement-id="'+att.id+'" dataelement-name="'+att.name+'" data-type="attribute" selected-tei-id={{selectedTei.trackedEntityInstance}} ></d2-audit></span>';
}
}