← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21781: Replaced the checkbox for completed status with a button

 

------------------------------------------------------------
revno: 21781
committer: jijukjose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-01-19 10:31:27 +0100
message:
  Replaced the checkbox for completed status with a button
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app_fr.properties
  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/views/buttons-section.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html


--
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/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties	2016-01-18 10:41:47 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties	2016-01-19 09:31:27 +0000
@@ -67,6 +67,8 @@
 new_event=New event
 completed_event=Event completion status
 is_event_complete=Completed
+event_completed=Completed
+event_incomplete=Incomplete
 data_element=Data element
 value=Value
 form_id=Form id

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app_fr.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app_fr.properties	2015-12-04 05:44:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app_fr.properties	2016-01-19 09:31:27 +0000
@@ -67,6 +67,8 @@
 new_event=Nouvel \u00E9v\u00E9nement
 completed_event=Event completion status
 is_event_complete=Completed
+event_completed=Completed
+event_incomplete=Incomplete
 data_element=\u00C9l\u00E9ment de donn\u00E9e
 value=Valeur
 form_id=Identifiant formulaire

=== 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	2016-01-15 16:25:20 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2016-01-19 09:31:27 +0000
@@ -129,6 +129,10 @@
             return;
         }
     }
+
+    $scope.completeEnrollment = function() {
+        $scope.currentEvent.status = !$scope.currentEvent.status;
+    }
     
     //load programs associated with the selected org unit.
     $scope.loadPrograms = function() {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html	2015-09-08 09:15:23 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/buttons-section.html	2016-01-19 09:31:27 +0000
@@ -1,4 +1,7 @@
-<div style="clear: both;" class="small-vertical-spacing">                        
+<div style="clear: both;" class="small-vertical-spacing">
+    <button type="button" class="btn btn-warning" ng-click="completeEnrollment()">
+        {{currentEvent.status ? 'event_completed' : 'event_incomplete' | translate}}
+    </button>
     <span ng-if="editingEventInFull">
         <button type="button" ng-click="updateEvent()" class="btn btn-primary hideInPrint">{{'update'| translate}}</button>
         <button type="button" ng-click="cancel()" class="btn btn-default hideInPrint">{{'cancel'| translate}}</button>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html	2015-12-24 12:02:01 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html	2016-01-19 09:31:27 +0000
@@ -124,8 +124,6 @@
                     <div class="bordered-div">
                         <div ng-if="displayCustomForm" ng-include="'views/ec-custom-form.html'"></div>  
                         <div ng-if="!displayCustomForm" ng-include="'views/defaultForm.html'"></div>
-                        <div ng-include="'views/completedForm.html'"></div>
-
                         <div ng-include="'views/comments-section.html'"></div>
                         <div ng-include="'views/buttons-section.html'"></div>
                     </div>