Mercurial > lada > lada-client
comparison app/controller/form/Ortszuordnung.js @ 1144:5ceb0381ae73
Set a regex and required for ortszuordnungstyp field.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 27 May 2016 14:51:12 +0200 |
parents | f1d21e6a7449 |
children | 1cf5280bbc45 |
comparison
equal
deleted
inserted
replaced
1142:255d550e74f4 | 1144:5ceb0381ae73 |
---|---|
150 * The Buttons are only active if the content of the form was altered | 150 * The Buttons are only active if the content of the form was altered |
151 * (the form is dirty). | 151 * (the form is dirty). |
152 */ | 152 */ |
153 dirtyForm: function(form, dirty) { | 153 dirtyForm: function(form, dirty) { |
154 if (dirty) { | 154 if (dirty) { |
155 form.owner.down('button[action=save]').setDisabled(false); | 155 if (form.getValues().ortId !== '') { |
156 form.owner.down('button[action=save]').setDisabled(false); | |
157 } | |
156 form.owner.down('button[action=discard]').setDisabled(false); | 158 form.owner.down('button[action=discard]').setDisabled(false); |
157 } | 159 } |
158 else { | 160 else { |
159 form.owner.down('button[action=save]').setDisabled(true); | 161 form.owner.down('button[action=save]').setDisabled(true); |
160 form.owner.down('button[action=discard]').setDisabled(true); | 162 form.owner.down('button[action=discard]').setDisabled(true); |