← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18096: event-capture - prevent form submission on click of enter

 

------------------------------------------------------------
revno: 18096
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-01-21 21:24:38 +0100
message:
  event-capture - prevent form submission on click of enter
modified:
  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/ec-custom-form.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/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-01-16 15:40:31 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-01-21 20:24:38 +0000
@@ -383,13 +383,13 @@
 <!-- buttons for event registration / update begins -->
 <div style="clear: both;">                        
     <span ng-if="editingEventInFull">
-        <button ng-click="updateEvent()" class="button not-printable">{{'update'| translate}}</button>
-        <button ng-click="showEventList()" class="button not-printable">{{'go_back'| translate}}</button>
+        <button type="button" ng-click="updateEvent()" class="button not-printable">{{'update'| translate}}</button>
+        <button type="button" ng-click="showEventList()" class="button not-printable">{{'go_back'| translate}}</button>
     </span>
     <span ng-if="eventRegistration">
-        <button ng-disabled="disableSaveAndAddNew" ng-click="addEvent(true)" class="button not-printable">{{'save_and_add_new'| translate}}</button>
-        <button ng-click="addEvent()" class="button not-printable">{{'save_and_back'| translate}}</button>
-        <button ng-click="showEventList(null)" class="button not-printable">{{'go_back'| translate}}</button>        
+        <button type="button" ng-disabled="disableSaveAndAddNew" ng-click="addEvent(true)" class="button not-printable">{{'save_and_add_new'| translate}}</button>
+        <button type="button" ng-click="addEvent()" class="button not-printable">{{'save_and_back'| translate}}</button>
+        <button type="button" ng-click="showEventList(null)" class="button not-printable">{{'go_back'| translate}}</button>        
     </span>
     <span ng-if="isFormInvalid()" class="horizontal-spacing red">{{'form_invalid' | translate}}</span>
         

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html	2015-01-16 15:40:31 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html	2015-01-21 20:24:38 +0000
@@ -88,13 +88,13 @@
 <!-- buttons for event registration / update begins -->
 <div style="clear: both;">                        
     <span ng-if="editingEventInFull">
-        <button ng-click="updateEvent()" class="button not-printable">{{'update'| translate}}</button>
-        <button ng-click="showEventList()" class="button not-printable">{{'go_back'| translate}}</button>
+        <button type="button" ng-click="updateEvent()" class="button not-printable">{{'update'| translate}}</button>
+        <button type="button" ng-click="showEventList()" class="button not-printable">{{'go_back'| translate}}</button>
     </span>
     <span ng-if="eventRegistration">
-        <button ng-disabled="disableSaveAndAddNew" ng-click="addEvent(true)" class="button not-printable">{{'save_and_add_new'| translate}}</button>
-        <button ng-click="addEvent()" class="button not-printable">{{'save_and_back'| translate}}</button>
-        <button ng-click="showEventList(null)" class="button not-printable">{{'go_back'| translate}}</button>
+        <button type="button" ng-disabled="disableSaveAndAddNew" ng-click="addEvent(true)" class="button not-printable">{{'save_and_add_new'| translate}}</button>
+        <button type="button" ng-click="addEvent()" class="button not-printable">{{'save_and_back'| translate}}</button>
+        <button type="button" ng-click="showEventList(null)" class="button not-printable">{{'go_back'| translate}}</button>
     </span>
     <span ng-if="isFormInvalid()" class="horizontal-spacing red">{{'form_invalid' | translate}}</span>
 </div>