← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20298: tracker/event-capture: css tyle for data entry error/success notification

 

------------------------------------------------------------
revno: 20298
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-09-22 18:33:27 +0200
message:
  tracker/event-capture: css tyle for data entry error/success notification
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js
  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/eventList.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
  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/styles/style.css
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.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/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-22 11:55:28 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-09-22 16:33:27 +0000
@@ -442,6 +442,7 @@
         $scope.editingEventInGrid = false;
         $scope.currentElement.updated = false;        
         $scope.currentEvent = {};
+        $scope.currentElement = {};
         $scope.currentEventOriginialValue = angular.copy($scope.currentEvent);
     };
     
@@ -973,15 +974,25 @@
     $scope.saveDatavalue = function(){        
         $scope.executeRules();
     };
-    /*$scope.getInputNotifcationClass = function(id, custom, event){
-        var style = "";
-        if($scope.currentElement.id && $scope.currentElement.id === id){            
-            style = $scope.currentElement.updated ? 'update-success' : 'update-error';
+    
+    $scope.getInputNotifcationClass = function(id, custom){
+        if($scope.currentElement.id && $scope.currentElement.id === id){
+            if($scope.currentElement.updated){
+                if(custom){
+                    return 'input-success';
+                }
+                return 'form-control input-success';
+            }            
+            else{
+                if(custom){
+                    return 'input-error';
+                }
+                return 'form-control input-error';
+            }            
+        }  
+        if(custom){
+            return '';
         }
-        return style + ' form-control'; 
-    };*/
-    
-    $scope.getInputNotifcationClass = function(id, custom){        
-        return '; ';
+        return 'form-control';
     };
 });
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js	2015-09-14 14:10:12 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js	2015-09-22 16:33:27 +0000
@@ -382,7 +382,6 @@
                             
                             var pushDirectAddressedVariable = function(variableWithCurls) {
                                 var variableName = $filter('trimvariablequalifiers')(variableWithCurls);
-;
                                 var variableNameParts = variableName.split('.');
 
                                 var newVariableObject;

=== 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	2015-09-21 15:01:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2015-09-22 16:33:27 +0000
@@ -53,11 +53,11 @@
 }
 
 .input-error {
-    background-color: #fffe8c;
+    background-color: #ff8a8a !important;
 }
 
-.update-success {
-    background-color: #b9ffb9;
+.input-success {
+    background-color: #b9ffb9 !important;
 }
 
 .red {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-09-18 09:14:54 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-09-22 16:33:27 +0000
@@ -166,13 +166,15 @@
                                                                d2-option-validator
                                                                on-select="updateEventDataValue(dhis2Event,eventGridColumn.id)" 
                                                                on-remove="validateOptionOnRemove(eventGridColumn.compulsory)"
-                                                               input-field-id={{eventGridColumn.id}}
-                                                               style="width:100%;"
-                                                               class={{getInputNotifcationClass(eventGridColumn.id,false)}}>
-                                                        <ui-select-match allow-clear="true" class="form-control" placeholder="{{'select_or_search' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
-                                                        <ui-select-choices  infinite-scroll="addMoreOptions()" 
-                                                                             infinite-scroll-distance="2" 
-                                                                             repeat="option.name as option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options | filter: $select.search | limitTo:infiniteScroll.currentOptions">
+                                                               input-field-id={{eventGridColumn.id}}                                                               
+                                                               style="width:100%;">
+                                                        <ui-select-match allow-clear="true" 
+                                                                         class="form-control-ui-select" 
+                                                                         ng-class="getInputNotifcationClass(eventGridColumn.id, true)" 
+                                                                         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:infiniteScroll.currentOptions">
                                                             <span ng-bind-html="option.name | highlight: $select.search"></span>
                                                         </ui-select-choices>
                                                     </ui-select>
@@ -185,6 +187,7 @@
                                                                ng-required={{eventGridColumn.compulsory}}
                                                                ng-model="currentEvent[eventGridColumn.id]" 
                                                                ng-change="updateEventDataValue(dhis2Event, eventGridColumn.id)" 
+                                                               ng-class="getInputNotifcationClass(eventGridColumn.id,false)"
                                                                value=""> {{'no_value' | translate}}<br>                                     
                                                     </label>                                    
                                                     <label ng-repeat="option in  optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options">
@@ -194,8 +197,7 @@
                                                                ng-required={{eventGridColumn.compulsory}}
                                                                ng-model="currentEvent[eventGridColumn.id]" 
                                                                ng-change="updateEventDataValue(dhis2Event, eventGridColumn.id)"
-                                                               ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                               ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"
+                                                               ng-class="getInputNotifcationClass(eventGridColumn.id,false)"
                                                                value={{option.name}}> {{option.name}}<br>                                    
                                                     </label>
                                                 </span> 
@@ -210,9 +212,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            input-field-id={{eventGridColumn.id}} 
                                                            name="foo" 
-                                                           class="form-control"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"/>
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
                                                 </div>
                                                 <div ng-switch-when="INTEGER">
                                                     <input type="number"                                                            
@@ -223,9 +223,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            input-field-id={{eventGridColumn.id}} 
                                                            name="foo" 
-                                                           class="form-control"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"/>
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
                                                 </div>
                                                 <div ng-switch-when="INTEGER_POSITIVE">
                                                     <input type="number"                                                            
@@ -236,9 +234,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            input-field-id={{eventGridColumn.id}} 
                                                            name="foo" 
-                                                           class="form-control"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"/>
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
                                                 </div>
                                                 <div ng-switch-when="INTEGER_NEGATIVE">
                                                     <input type="number"                                                            
@@ -249,9 +245,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            input-field-id={{eventGridColumn.id}} 
                                                            name="foo" 
-                                                           class="form-control"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"/>
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
                                                 </div>
                                                 <div ng-switch-when="INTEGER_ZERO_OR_POSITIVE">
                                                     <input type="number"                                                            
@@ -262,9 +256,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            input-field-id={{eventGridColumn.id}} 
                                                            name="foo" 
-                                                           class="form-control"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"/>
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
                                                 </div>
                                                 <div ng-switch-when="LONG_TEXT">                                        
                                                     <textarea rows="3"
@@ -273,9 +265,7 @@
                                                             ng-blur="updateEventDataValue(dhis2Event, eventGridColumn.id)" 
                                                             name="foo" 
                                                             input-field-id={{eventGridColumn.id}} 
-                                                            ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                            ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                            class="form-control">
+                                                            ng-class="getInputNotifcationClass(eventGridColumn.id,false)">
                                                         </textarea>
                                                 </div>
                                                 <div ng-switch-when="TEXT">
@@ -284,7 +274,7 @@
                                                                ng-required={{eventGridColumn.compulsory}}
                                                                ng-blur="updateEventDataValue(dhis2Event, eventGridColumn.id)" 
                                                                name="foo" 
-                                                               class="form-control"/>                                                    
+                                                               ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>                                                    
                                                 </div>                                        
                                                 <div ng-switch-when="BOOLEAN">
                                                     <select ng-model="currentEvent[eventGridColumn.id]" 
@@ -292,9 +282,7 @@
                                                             ng-required={{eventGridColumn.compulsory}}
                                                             input-field-id={{eventGridColumn.id}} 
                                                             name="foo" 
-                                                            style="width:98%;"
-                                                            ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                            ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]">
+                                                            ng-class="getInputNotifcationClass(eventGridColumn.id,false)">
                                                         <option value="">{{pleaseSelectLabel}}</option>                        
                                                         <option value="false">{{noLabel}}</option>
                                                         <option value="true">{{yesLabel}}</option>
@@ -311,9 +299,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            ng-disabled="eventGridColumn.id == 'event_date'"
                                                            input-field-id={{eventGridColumn.id}}                                                            
-                                                           style="width:98%;"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"
                                                            name="foo"/>
                                                 </div>
                                                 <div ng-switch-when="DATETIME">
@@ -327,9 +313,7 @@
                                                            ng-required={{eventGridColumn.compulsory}}
                                                            ng-disabled="eventGridColumn.id == 'event_date'"
                                                            input-field-id={{eventGridColumn.id}}                                                            
-                                                           style="width:98%;"
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"
                                                            name="foo"/>
                                                 </div>
                                                 <div ng-switch-when="TRUE_ONLY">
@@ -338,9 +322,8 @@
                                                            ng-model="currentEvent[eventGridColumn.id]"
                                                            ng-change="updateEventDataValue(dhis2Event, eventGridColumn.id)" 
                                                            ng-required={{eventGridColumn.compulsory}} 
-                                                           input-field-id={{eventGridColumn.id}}                                                            
-                                                           ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]"
-                                                           ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"
+                                                           input-field-id={{eventGridColumn.id}} 
+                                                           ng-class="getInputNotifcationClass(eventGridColumn.id,false)"
                                                            name="foo"/>
                                                 </div>
                                                 <div ng-switch-default>
@@ -349,7 +332,7 @@
                                                                ng-required={{eventGridColumn.compulsory}}
                                                                ng-blur="updateEventDataValue(dhis2Event, eventGridColumn.id)" 
                                                                name="foo" 
-                                                               class="form-control"/>                                                    
+                                                               ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>                                                    
                                                 </div>
                                                 <div ng-messages="innerFormGrid.foo.$error" ng-if="interacted(innerFormGrid.foo)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
                                                 </div>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-09-17 11:18:51 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-09-22 16:33:27 +0000
@@ -736,30 +736,29 @@
 
     };
 
-    /*$scope.getInputNotifcationClass = function(id, custom, event){
-     if(!event) {
-     event = $scope.currentEvent;
-     }
-     if($scope.currentElement.id && $scope.currentElement.event){
-     if($scope.currentElement.saved && ($scope.currentElement.id === id && $scope.currentElement.event === event.event)){
-
-     if(custom){
-     return 'input-success';
-     }
-     return 'form-control input-success';
-     }            
-     if(!$scope.currentElement.saved && ($scope.currentElement.id === id && $scope.currentElement.event === event.event)){
-     if(custom){
-     return 'input-error';
-     }
-     return 'form-control input-error';
-     }            
-     }  
-     if(custom){
-     return '';
-     }
-     return 'form-control';
-     };*/
+    $scope.getInputNotifcationClass = function(id, custom, event){
+        if(!event) {
+            event = $scope.currentEvent;
+        }
+        if($scope.currentElement.id && $scope.currentElement.id === id && $scope.currentElement.event && $scope.currentElement.event === event.event){
+            if($scope.currentElement.saved){
+                if(custom){
+                    return 'input-success';
+                }
+                return 'form-control input-success';
+            }            
+            else{
+                if(custom){
+                    return 'input-error';
+                }
+                return 'form-control input-error';
+            }            
+        }  
+        if(custom){
+            return '';
+        }
+        return 'form-control';
+    };
 
     //Infinite Scroll
     $scope.infiniteScroll = {};
@@ -774,20 +773,6 @@
         $scope.infiniteScroll.currentOptions += $scope.infiniteScroll.optionsToAdd;
     };
 
-    $scope.getInputNotifcationClass = function (id, custom, event) {
-        if (!event) {
-            event = $scope.currentEvent;
-        }
-        if ($scope.currentElement.id &&
-                $scope.currentElement.event &&
-                $scope.currentElement.id === id &&
-                $scope.currentElement.event === event.event) {
-            return $scope.currentElement.saved ? 'input-success; ' : 'input-error; ';
-        }
-
-        return '';
-    };
-
     var completeEnrollment = function () {
         var modalOptions = {
             closeButtonText: 'cancel',

=== 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	2015-09-21 15:01:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html	2015-09-22 16:33:27 +0000
@@ -29,7 +29,7 @@
                                         name="foo" 
                                         on-select="saveDatavalue(prStDe, innerForm.foo)"
                                         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}}">{{$select.selected.name  || $select.selected}}</ui-select-match>
+                                <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:30">
                                   <span ng-bind-html="option.name | highlight: $select.search"></span>
                                 </ui-select-choices>
@@ -37,9 +37,9 @@
                         </div>
                         <div ng-if="selectedProgram.dataEntryMethod && optionSets[prStDe.dataElement.optionSet.id].options.length < 7">
                             <label>                                        
-                                <input type="radio"
-                                    ng-class='getInputNotifcationClass(prStDe.dataElement.id,true)'
+                                <input type="radio"                                    
                                     class="form-control"
+                                    ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                     name={{prStDe.dataElement.id}}
                                     ng-required={{prStDe.compulsory}} 
                                     ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed" 
@@ -51,7 +51,7 @@
                                 <label>
                                     <input type="radio"
                                         class="form-control"
-                                        ng-class='getInputNotifcationClass(prStDe.dataElement.id,true)'
+                                        ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                         name={{prStDe.dataElement.id}}
                                         ng-required={{prStDe.compulsory}} 
                                         ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed" 
@@ -67,7 +67,7 @@
                             <input type="number"                                   
                                    number-type={{prStDe.dataElement.valueType}}
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                    ng-model="currentEvent[prStDe.dataElement.id]"                                    
                                    d2-number-validator
                                    ng-required={{prStDe.compulsory}}
@@ -79,7 +79,7 @@
                             <input type="number"                                   
                                    number-type={{prStDe.dataElement.valueType}}
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                    ng-model="currentEvent[prStDe.dataElement.id]"                                    
                                    d2-number-validator
                                    ng-required={{prStDe.compulsory}}
@@ -103,7 +103,7 @@
                             <input type="number"                                   
                                    number-type={{prStDe.dataElement.valueType}}
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                    ng-model="currentEvent[prStDe.dataElement.id]"                                    
                                    d2-number-validator
                                    ng-required={{prStDe.compulsory}}
@@ -115,7 +115,7 @@
                             <input type="number"                                   
                                    number-type={{prStDe.dataElement.valueType}}
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                    ng-model="currentEvent[prStDe.dataElement.id]"                                    
                                    d2-number-validator
                                    ng-required={{prStDe.compulsory}}
@@ -125,7 +125,7 @@
                         </div>                        
                         <div ng-switch-when="LONG_TEXT">
                             <textarea rows="3"
-                                ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                 class="form-control"
                                 ng-model="currentEvent[prStDe.dataElement.id]" 
                                 ng-required={{prStDe.compulsory}} 
@@ -136,7 +136,7 @@
                         </div>
                         <div ng-switch-when="TEXT">
                             <input type="text"
-                                    ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                    ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                     class="form-control"
                                     ng-model="currentEvent[prStDe.dataElement.id]" 
                                     ng-required={{prStDe.compulsory}} 
@@ -145,7 +145,7 @@
                                     name="foo"/>                            
                         </div>
                         <div ng-switch-when="BOOLEAN">
-                            <select ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                            <select ng-class="getInputNotifcationClass(prStDe.dataElement.id,false, currentEvent)"
                                     class="form-control"
                                     ng-model="currentEvent[prStDe.dataElement.id]" 
                                     ng-required={{prStDe.compulsory}} 
@@ -164,7 +164,7 @@
                                    d2-date-validator
                                    max-date="prStDe.allowFutureDate ? '' : 0"
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   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" 
@@ -174,7 +174,7 @@
                         <div ng-switch-when="TRUE_ONLY">
                             <input type="checkbox"     
                                    class="form-control"
-                                   ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                   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" 
@@ -184,7 +184,7 @@
                         <div ng-switch-default>
                             <input type="text" 
                                 class="form-control"
-                                ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
+                                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" 
@@ -250,7 +250,7 @@
                                                         name="foo" 
                                                         on-select="saveDatavalue(prStDes[de.dataElement.id], innerForm.foo)"  
                                                         style="width:100%;">
-                                                <ui-select-match allow-clear="true" ng-class={{getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)}}  class="form-control-ui-select"  placeholder="{{'select_or_search' | translate}}">{{$select.selected.name  || $select.selected}}</ui-select-match>
+                                                <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:30">
                                                   <span ng-bind-html="option.name | highlight: $select.search"></span>
                                                 </ui-select-choices>
@@ -260,7 +260,7 @@
                                             <label>                                        
                                                 <input type="radio"
                                                     class="form-control"
-                                                    ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,true)'
+                                                    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}} 
                                                     ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed" 
@@ -272,7 +272,7 @@
                                                 <label>
                                                     <input type="radio"
                                                         class="form-control"   
-                                                        ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,true)'
+                                                        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}} 
                                                         ng-disabled="selectedEnrollment.status !== 'ACTIVE' || currentEvent.editingNotAllowed" 
@@ -289,7 +289,7 @@
                                                    d2-number-validator
                                                    number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -301,7 +301,7 @@
                                                    d2-number-validator
                                                    number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -313,7 +313,7 @@
                                                    d2-number-validator
                                                    number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -325,7 +325,7 @@
                                                    d2-number-validator
                                                    number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -337,7 +337,7 @@
                                                    d2-number-validator
                                                    number-type={{prStDes[de.dataElement.id].dataElement.valueType}}
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -346,7 +346,7 @@
                                         </div>
                                         <div ng-switch-when="BOOLEAN">
                                             <select class="form-control"
-                                                    ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                    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" 
@@ -364,7 +364,7 @@
                                                    d2-date-validator
                                                    max-date="prStDes[de.dataElement.id].allowFutureDate ? '' : 0"
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -374,7 +374,7 @@
                                         <div ng-switch-when="TRUE_ONLY">
                                             <input type="checkbox"          
                                                    class="form-control"
-                                                   ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                   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" 
@@ -384,7 +384,7 @@
                                         <div ng-switch-when="LONG_TEXT">
                                             <textarea rows="3" 
                                                     class="form-control"
-                                                    ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                    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" 
@@ -395,7 +395,7 @@
                                         <div ng-switch-when="TEXT">
                                             <input type="text" 
                                                     class="form-control"   
-                                                    ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                    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" 
@@ -405,7 +405,7 @@
                                         <div ng-switch-default>
                                             <input type="text" 
                                                 class="form-control"
-                                                ng-class='getInputNotifcationClass(prStDes[de.dataElement.id].dataElement.id,false)'
+                                                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" 

=== 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-09-21 15:01:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css	2015-09-22 16:33:27 +0000
@@ -183,6 +183,7 @@
 
 .input-success {
     background-color: #b9ffb9 !important;
+    color: red;
 }
 
 .alert-default {
@@ -1156,6 +1157,7 @@
     line-height:1.0; 
     padding: 20px 6px;
     border-radius: 4px;
+    background-color: red;
 }
 
 .select2-container .select2-choice {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.js	2015-09-09 15:01:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.js	2015-09-22 16:33:27 +0000
@@ -1816,7 +1816,8 @@
 $templateCache.put("bootstrap/select.tpl.html","<div class=\"ui-select-container ui-select-bootstrap dropdown\" ng-class=\"{open: $select.open}\"><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" tabindex=\"-1\" aria-expanded=\"true\" aria-label=\"{{ $select.baseTitle }}\" aria-owns=\"ui-select-choices-{{ $select.generatedId }}\" aria-activedescendant=\"ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}\" class=\"form-control ui-select-search\" placeholder=\"{{$select.placeholder}}\" ng-model=\"$select.search\" ng-show=\"$select.searchEnabled && $select.open\"><div class=\"ui-select-choices\"></div></div>");
 $templateCache.put("select2/choices.tpl.html","<ul class=\"ui-select-choices ui-select-choices-content select2-results\"><li class=\"ui-select-choices-group\" ng-class=\"{\'select2-result-with-children\': $select.choiceGrouped($group) }\"><div ng-show=\"$select.choiceGrouped($group)\" class=\"ui-select-choices-group-label select2-result-label\" ng-bind=\"$group.name\"></div><ul role=\"listbox\" id=\"ui-select-choices-{{ $select.generatedId }}\" ng-class=\"{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }\"><li role=\"option\" id=\"ui-select-choices-row-{{ $select.generatedId }}-{{$index}}\" class=\"ui-select-choices-row\" ng-class=\"{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}\"><div class=\"select2-result-label ui-select-choices-row-inner\"></div></li></ul></li></ul>");
 $templateCache.put("select2/match-multiple.tpl.html","<span class=\"ui-select-match\"><li class=\"ui-select-match-item select2-search-choice\" ng-repeat=\"$item in $select.selected\" ng-class=\"{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}\" ui-select-sort=\"$select.selected\"><span uis-transclude-append=\"\"></span> <a href=\"javascript:;\" class=\"ui-select-match-close select2-search-choice-close\" ng-click=\"$selectMultiple.removeChoice($index)\" tabindex=\"-1\"></a></li></span>");
-$templateCache.put("select2/match.tpl.html","<a class=\"select2-choice ui-select-match\" ng-class=\"{\'select2-default\': $select.isEmpty()}\" ng-click=\"$select.toggle($event)\" aria-label=\"{{ $select.baseTitle }} select\"><span ng-show=\"$select.isEmpty()\" class=\"select2-chosen\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" class=\"select2-chosen\" ng-transclude=\"\"></span> <abbr ng-if=\"$select.allowClear && !$select.isEmpty()\" class=\"select2-search-choice-close\" ng-click=\"$select.clear($event)\"></abbr> <span class=\"select2-arrow ui-select-toggle\"><b></b></span></a>");
+//$templateCache.put("select2/match.tpl.html","<a class=\"select2-choice ui-select-match\" ng-class=\"{\'select2-default\': $select.isEmpty()}\" ng-click=\"$select.toggle($event)\" aria-label=\"{{ $select.baseTitle }} select\"><span ng-show=\"$select.isEmpty()\" class=\"select2-chosen\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" class=\"select2-chosen\" ng-transclude=\"\"></span> <abbr ng-if=\"$select.allowClear && !$select.isEmpty()\" class=\"select2-search-choice-close\" ng-click=\"$select.clear($event)\"></abbr> <span class=\"select2-arrow ui-select-toggle\"><b></b></span></a>");
+$templateCache.put("select2/match.tpl.html","<a class=\"select2-choice ui-select-match\" ng-click=\"$select.toggle($event)\" aria-label=\"{{ $select.baseTitle }} select\"><span ng-show=\"$select.isEmpty()\" class=\"select2-chosen\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" class=\"select2-chosen\" ng-transclude=\"\"></span> <abbr ng-if=\"$select.allowClear && !$select.isEmpty()\" class=\"select2-search-choice-close\" ng-click=\"$select.clear($event)\"></abbr> <span class=\"select2-arrow ui-select-toggle\"><b></b></span></a>");
 $templateCache.put("select2/select-multiple.tpl.html","<div class=\"ui-select-container ui-select-multiple select2 select2-container select2-container-multi\" ng-class=\"{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}\"><ul class=\"select2-choices\"><span class=\"ui-select-match\"></span><li class=\"select2-search-field\"><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" role=\"combobox\" aria-expanded=\"true\" aria-owns=\"ui-select-choices-{{ $select.generatedId }}\" aria-label=\"{{ $select.baseTitle }}\" aria-activedescendant=\"ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}\" class=\"select2-input ui-select-search\" placeholder=\"{{$selectMultiple.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-hide=\"$select.disabled\" ng-model=\"$select.search\" ng-click=\"$select.activate()\" style=\"width: 34px;\" ondrop=\"return false;\"></li></ul><div class=\"ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active\" ng-class=\"{\'select2-display-none\': !$select.open}\"><div class=\"ui-select-choices\"></div></div></div>");
 $templateCache.put("select2/select.tpl.html","<div class=\"ui-select-container select2 select2-container\" ng-class=\"{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}\"><div class=\"ui-select-match\"></div><div class=\"ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active\" ng-class=\"{\'select2-display-none\': !$select.open}\"><div class=\"select2-search\" ng-show=\"$select.searchEnabled\"><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" role=\"combobox\" aria-expanded=\"true\" aria-owns=\"ui-select-choices-{{ $select.generatedId }}\" aria-label=\"{{ $select.baseTitle }}\" aria-activedescendant=\"ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}\" class=\"ui-select-search select2-input\" ng-model=\"$select.search\"></div><div class=\"ui-select-choices\"></div></div></div>");
 $templateCache.put("selectize/choices.tpl.html","<div ng-show=\"$select.open\" class=\"ui-select-choices ui-select-dropdown selectize-dropdown single\"><div class=\"ui-select-choices-content selectize-dropdown-content\"><div class=\"ui-select-choices-group optgroup\" role=\"listbox\"><div ng-show=\"$select.isGrouped\" class=\"ui-select-choices-group-label optgroup-header\" ng-bind=\"$group.name\"></div><div role=\"option\" class=\"ui-select-choices-row\" ng-class=\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\"><div class=\"option ui-select-choices-row-inner\" data-selectable=\"\"></div></div></div></div></div>");

=== 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-09-22 14:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js	2015-09-22 16:33:27 +0000
@@ -371,8 +371,7 @@
 
                             var commonInputFieldProperty = this.getAttributesAsString(attributes) +
                                     ' ng-model="currentEvent.' + fieldId + '" ' +
-                                    ' input-field-id="' + fieldId + '"' +
-                                    ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
+                                    ' input-field-id="' + fieldId + '"' +                                   
                                     ' ng-disabled="isHidden(prStDes.' + fieldId + '.dataElement.id) || selectedEnrollment.status===\'CANCELLED\' || selectedEnrollment.status===\'COMPLETED\' || currentEvent[uid]==\'uid\' || currentEvent.editingNotAllowed"' +
                                     ' ng-required="{{prStDes.' + fieldId + '.compulsory}}" ';
 
@@ -381,7 +380,7 @@
                                 if (prStDe.dataElement.optionSetValue) {
                                     var optionSetId = prStDe.dataElement.optionSet.id;                 
                                     newInputField = '<ui-select theme="select2" ' + commonInputFieldProperty + ' on-select="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" >' +
-                                            '<ui-select-match allow-clear="true" placeholder="' + $translate.instant('select_or_search') + '">{{$select.selected.name || $select.selected}}</ui-select-match>' +
+                                            '<ui-select-match 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:30">' +
                                             '<span ng-bind-html="option.name | highlight: $select.search"></span>' +
@@ -397,6 +396,7 @@
                                     		prStDe.dataElement.valueType === "INTEGER_ZERO_OR_POSITIVE") {
                                         newInputField = '<input type="number" ' +
                                                 ' d2-number-validator ' +
+                                                ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
                                                 ' number-type="' + prStDe.dataElement.valueType + '" ' +
                                                 ' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
                                                 commonInputFieldProperty + ' >';
@@ -404,6 +404,7 @@
                                     else if (prStDe.dataElement.valueType === "BOOLEAN") {
                                         newInputField = '<select ' +
                                                 ' ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')" ' +
+                                                ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
                                                 commonInputFieldProperty + '>' +
                                                 '<option value="">{{\'please_select\'| translate}}</option>' +
                                                 '<option value="false">{{\'no\'| translate}}</option>' +
@@ -414,6 +415,7 @@
                                         var maxDate = prStDe.allowFutureDate ? '' : 0;
                                         newInputField = '<input type="text" ' +
                                                 ' placeholder="{{dhis2CalendarFormat.keyDateFormat}}" ' +
+                                                ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
                                                 ' d2-date ' +
                                                 ' d2-date-validator ' +
                                                 ' max-date="' + maxDate + '"' +
@@ -422,16 +424,19 @@
                                     }
                                     else if (prStDe.dataElement.valueType === "TRUE_ONLY") {
                                         newInputField = '<input type="checkbox" ' +
+                                                ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
                                                 ' ng-change="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
                                                 commonInputFieldProperty + ' >';
                                     }
                                     else if (prStDe.dataElement.valueType === "LONG_TEXT") {
                                         newInputField = '<textarea row ="3" ' +
+                                                ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
                                                 ' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
                                                 commonInputFieldProperty + ' >';
                                     }
                                     else {
                                         newInputField = '<input type="text" ' +
+                                                ' ng-class="{{getInputNotifcationClass(prStDes.' + fieldId + '.dataElement.id, true)}}" ' +
                                                 ' ng-blur="saveDatavalue(prStDes.' + fieldId + ', outerForm.' + fieldId + ')"' +
                                                 commonInputFieldProperty + ' >';
                                     }