diff app/view/widgets/LadaForm.js @ 84:5ad82cff1a21

Only submit form if internal validation is ok.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 11 Jun 2013 11:18:17 +0200
parents 8525e3525538
children 079f99229eff
line wrap: on
line diff
--- a/app/view/widgets/LadaForm.js	Tue Jun 11 11:17:33 2013 +0200
+++ b/app/view/widgets/LadaForm.js	Tue Jun 11 11:18:17 2013 +0200
@@ -60,7 +60,7 @@
     },
 
     commit: function(callback, scope) {
-        if (this.form.isDirty()) {
+        if (this.form.isDirty() && this.form.isValid()) {
             this.form.updateRecord(this.model);
 
             this.model.save({

http://lada.wald.intevation.org