[Lada-commits] [PATCH 1 of 2] Enable validation for SetStatus window
Wald Commits
scm-commit at wald.intevation.org
Fri Oct 28 17:03:14 CEST 2016
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1477654986 -7200
# Node ID d5b9a5c758728bfd4983cb977bc6c062b7a4c54d
# Parent 848b50a4a4eb1141591e8deba26b99a8841b8298
Enable validation for SetStatus window.
diff -r 848b50a4a4eb -r d5b9a5c75872 app/view/window/SetStatus.js
--- a/app/view/window/SetStatus.js Thu Oct 27 19:52:29 2016 +0200
+++ b/app/view/window/SetStatus.js Fri Oct 28 13:43:06 2016 +0200
@@ -31,7 +31,7 @@
var i18n = Lada.getApplication().bundle;
var me = this;
this.items = [{
- xtype: 'panel',
+ xtype: 'form',
name: 'valueselection',
border: 0,
items: [{
@@ -64,6 +64,18 @@
fieldLabel: i18n.getMsg('statusgrid.header.text'),
emptyText: 'Geben Sie einen Kommentar ein.'
}]
+ }],
+ buttons: [{
+ text: i18n.getMsg('statusSetzen'),
+ name: 'start',
+ icon: 'resources/img/mail-mark-notjunk.png',
+ formBind: true,
+ disabled: true,
+ handler: this.setStatus
+ }, {
+ text: i18n.getMsg('cancel'),
+ name: 'abort',
+ handler: this.closeWindow
}]
}, {
xtype: 'panel',
@@ -78,15 +90,6 @@
text: 'Verarbeite Statusänderungen'
}];
this.buttons = [{
- text: i18n.getMsg('statusSetzen'),
- name: 'start',
- icon: 'resources/img/mail-mark-notjunk.png',
- handler: this.setStatus
- }, {
- text: i18n.getMsg('cancel'),
- name: 'abort',
- handler: this.closeWindow
- }, {
text: i18n.getMsg('close'),
name: 'close',
hidden: true,
@@ -94,6 +97,9 @@
}];
this.callParent(arguments);
+
+ // Initially validate to indicate mandatory fields clearly.
+ this.down('form').isValid();
},
/**
More information about the Lada-commits
mailing list