From d1162a927bd47ae1c3634c91d9ed5d4191d9dcf9 Mon Sep 17 00:00:00 2001
From: gregorwolf
Date: Mon, 4 Sep 2017 20:48:13 +0000
Subject: [PATCH] Avoid double registration by disable save button
---
webapp/controller/CreateEntity.controller.js | 9 +++++----
webapp/i18n/i18n.properties | 3 ++-
webapp/view/CreateEntity.view.xml | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/webapp/controller/CreateEntity.controller.js b/webapp/controller/CreateEntity.controller.js
index cccebaa..284e413 100644
--- a/webapp/controller/CreateEntity.controller.js
+++ b/webapp/controller/CreateEntity.controller.js
@@ -47,8 +47,7 @@ sap.ui.define([
this._oODataModel = this.getOwnerComponent().getModel();
this._oCurrentUser = this.getOwnerComponent().getModel("currentUser");
this._oResourceBundle = this.getResourceBundle();
-
- },
+ },
/**
* Event handler (attached declaratively) for the view save button. Saves the changes added by the user.
* @function
@@ -56,6 +55,7 @@ sap.ui.define([
* @public
*/
onSave: function(oEvent) {
+ this.getModel("appView").setProperty("/busy", true);
var that = this,
oModel = this.getModel();
//Get the Path
@@ -79,6 +79,7 @@ sap.ui.define([
id: "noChangesInfoMessageBox",
styleClass: that.getOwnerComponent().getContentDensityClass()
});
+ this.getModel("appView").setProperty("/busy", false);
return;
}
// abort if receipt is requested but no ReceiptCompany or ReceiptAddress is filled. Issue #1
@@ -89,9 +90,9 @@ sap.ui.define([
id: "companyAndAdressRequiredMessageBox",
styleClass: that.getOwnerComponent().getContentDensityClass()
});
+ this.getModel("appView").setProperty("/busy", false);
return;
- }
- this.getModel("appView").setProperty("/busy", true);
+ }
if (this._oViewModel.getProperty("/mode") === "edit") {
// attach to the request completed event of the batch
oModel.attachEventOnce("batchRequestCompleted", function(oEvent2) {
diff --git a/webapp/i18n/i18n.properties b/webapp/i18n/i18n.properties
index e2c0bb8..33401ca 100644
--- a/webapp/i18n/i18n.properties
+++ b/webapp/i18n/i18n.properties
@@ -257,7 +257,8 @@ aboutText=The SAP Inside Track Registration App is an Open Source project bro
If you plan to host a SAP Inside Track you can use this app too! Just request the organizer role directly here in the app via the info menu \
(when Issue #4 \
is fixed). Until then reach out to Gregor Wolf. \
-
+
\
+ Version 0.1.2
ButtonAboutClose=Close
ButtonRequestOrganiserRole=Request Organizer Role
\ No newline at end of file
diff --git a/webapp/view/CreateEntity.view.xml b/webapp/view/CreateEntity.view.xml
index 33dbc0a..836063b 100644
--- a/webapp/view/CreateEntity.view.xml
+++ b/webapp/view/CreateEntity.view.xml
@@ -91,7 +91,7 @@
-
+