← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17597: bug fix - add event button fails to activate after form is found invalid

 

------------------------------------------------------------
revno: 17597
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-11-26 14:37:32 +0100
message:
  bug fix - add event button fails to activate after form is found invalid
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html
  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/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/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2014-11-12 16:49:17 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/index.html	2014-11-26 13:37:32 +0000
@@ -6,13 +6,7 @@
         <meta name="description" content="DHIS 2">
         <meta name="keywords" content="DHIS 2">        
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        
-        <script type="text/javascript">
-            window.google = null;
-        </script>
-
-        <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&libraries=geometry";></script>
-        
+       
         <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery-ui.min.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.plugin.min.js"></script>

=== 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	2014-11-20 11:36:44 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2014-11-26 13:37:32 +0000
@@ -413,10 +413,6 @@
             return false;
         }
         
-        if(addingAnotherEvent){
-            $scope.disableSaveAndAddNew = true;
-        }
-        
         //the form is valid, get the values
         //but there could be a case where all dataelements are non-mandatory and
         //the event form comes empty, in this case enforce at least one value
@@ -449,6 +445,10 @@
             return false;
         }        
         
+        if(addingAnotherEvent){
+            $scope.disableSaveAndAddNew = true;
+        }
+        
         var newEvent = angular.copy($scope.currentEvent);        
         
         //prepare the event to be created
@@ -726,4 +726,4 @@
         }, function () {
         });
     };
-});
\ No newline at end of file
+});

=== 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	2014-11-12 16:49:17 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html	2014-11-26 13:37:32 +0000
@@ -1,6 +1,3 @@
-<!--<script src="../dhis-web-commons/ouwt/ouwt.js"></script>
-<script src="scripts/event-capture.js"></script>-->
-
 <div id="leftBar"> 
 
     <div style="margin-top:20px">