comparison 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
comparison
equal deleted inserted replaced
83:8525e3525538 84:5ad82cff1a21
58 this.model = model; 58 this.model = model;
59 this.loadRecord(model); 59 this.loadRecord(model);
60 }, 60 },
61 61
62 commit: function(callback, scope) { 62 commit: function(callback, scope) {
63 if (this.form.isDirty()) { 63 if (this.form.isDirty() && this.form.isValid()) {
64 this.form.updateRecord(this.model); 64 this.form.updateRecord(this.model);
65 65
66 this.model.save({ 66 this.model.save({
67 callback: function(records, operation) { 67 callback: function(records, operation) {
68 this.parseResponse(operation); 68 this.parseResponse(operation);

http://lada.wald.intevation.org