diff app/controller/form/Ortszuordnung.js @ 1147:1cf5280bbc45

Fix regex and validate more expressively and stringently.
author Tom Gottfried <tom@intevation.de>
date Fri, 27 May 2016 18:07:44 +0200
parents 5ceb0381ae73
children a792eecf1614
line wrap: on
line diff
--- a/app/controller/form/Ortszuordnung.js	Fri May 27 14:52:56 2016 +0200
+++ b/app/controller/form/Ortszuordnung.js	Fri May 27 18:07:44 2016 +0200
@@ -152,7 +152,9 @@
      */
     dirtyForm: function(form, dirty) {
         if (dirty) {
-            if (form.getValues().ortId !== '') {
+            if (form.getValues().ortId !== ''
+                && /[UEZA]/.test(form.getValues().ortszuordnungTyp)
+               ) {
                 form.owner.down('button[action=save]').setDisabled(false);
             }
             form.owner.down('button[action=discard]').setDisabled(false);

http://lada.wald.intevation.org