commit 4ca432f5b363d6e80cfedf384a45ce83860f1280
parent 1096e1387a86a42621bca517a2425f388ee9537b
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 4 Nov 2015 19:36:47 +0100
Properly disable the next button when running tests, fixes #458
Diffstat:
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/web/setup/js/Cards/AdminUserCard.js b/web/setup/js/Cards/AdminUserCard.js
@@ -87,14 +87,18 @@ Ext.define('PartKeeprSetup.AdminUserCard', {
this.layout.setActiveItem(1);
} else {
this.layout.setActiveItem(0);
+ // Disable the "next" button, this needs to get enabled by the admin user form
+ Ext.ComponentQuery.query('#nextBtn')[0].disable();
}
- // Disable the "next" button, this needs to get enabled by the database cards
- Ext.ComponentQuery.query('#nextBtn')[0].disable();
this.onUpdateParameters();
},
onUpdateParameters: function ()
{
+ if (PartKeeprSetup.getApplication().getSetupConfig().existingConfig === true) {
+ return;
+ }
+
if (this.username.isValid() && this.password.isValid() && this.email.isValid()) {
var config = PartKeeprSetup.getApplication().getSetupConfig();
diff --git a/web/setup/js/Cards/DatabaseParametersCard.MySQL.js b/web/setup/js/Cards/DatabaseParametersCard.MySQL.js
@@ -160,6 +160,7 @@ Ext.define('PartKeeprSetup.DatabaseParametersCard.MySQL', {
this.callParent();
this.on("activate", this.onActivate, this);
+ this.on("activate", this.onUpdateParameters, this);
},
onActivate: function () {
this.initial = true;
diff --git a/web/setup/js/wizard/BreadCrumbWizard.js b/web/setup/js/wizard/BreadCrumbWizard.js
@@ -124,6 +124,8 @@ Ext.define('Ext.ux.BreadCrumbWizard', {
previousButton = this.down('#previousButton'),
childViewCount = this.cardContainer.items.getCount();
if (index < childViewCount) {
+ nextBtn.enable();
+
this.cardContainer.getLayout().setActiveItem(index);
this.currentIndex = index;
@@ -133,8 +135,6 @@ Ext.define('Ext.ux.BreadCrumbWizard', {
previousButton.enable();
}
- nextBtn.enable();
-
if (index === childViewCount - 1) {
nextBtn.setText('Submit');
} else {