Dodo-app: fix sync user info bug
          disable form after running app installation

Change-Id: I28dec5f8a9ad1d586bc2d2cc56a6c1c66cf2fdbe
diff --git a/core/installer/welcome/static/dodo-app.js b/core/installer/welcome/static/dodo-app.js
new file mode 100644
index 0000000..ccb5252
--- /dev/null
+++ b/core/installer/welcome/static/dodo-app.js
@@ -0,0 +1,20 @@
+function triggerForm(status, buttonTxt) {
+    const form = document.getElementById("create-app");
+    const elements = form.querySelectorAll("input, select, textarea, button");
+    const button = document.getElementById("create-app-button");
+    button.textContent = buttonTxt;
+    button.setAttribute("aria-busy", status);
+    elements.forEach(element => {
+        element.disabled = status;
+    });
+}
+
+document.addEventListener("DOMContentLoaded", () => {
+    const form = document.getElementById("create-app");
+    form.addEventListener("submit", (event) => {
+        setTimeout(() => {
+            triggerForm(true, "creating app ...");
+        }, 0);
+    });
+    triggerForm(false, "create app");
+});