Просмотр исходного кода

Merge pull request #3347 from weseek/master

release v4.2.7
Yuki Takei 5 лет назад
Родитель
Сommit
3cf7674020
3 измененных файлов с 21 добавлено и 11 удалено
  1. 7 2
      CHANGES.md
  2. 1 1
      package.json
  3. 13 8
      src/client/js/components/InstallerForm.jsx

+ 7 - 2
CHANGES.md

@@ -1,6 +1,11 @@
 # CHANGES
 
-## v4.2.6-RC
+
+## v4.2.7
+
+* Fix: Installer doesn't work on Chrome
+
+## v4.2.6
 
 * Feature: Add a button to jump to Comments section
 * Feature: Paste Bootstrap4 Grid HTML with GUI
@@ -18,7 +23,7 @@
 * Support: Upgrade libs
     * axios
 
-## v4.2.5-RC
+## v4.2.5
 
 * Improvement: Invoke garbage collection when reindex all pages by elasticsearch
 * Fix: MathJax rendering does not work

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "growi",
-  "version": "4.2.6-RC",
+  "version": "4.2.7-RC",
   "description": "Team collaboration software using markdown",
   "tags": [
     "wiki",

+ 13 - 8
src/client/js/components/InstallerForm.jsx

@@ -13,12 +13,12 @@ class InstallerForm extends React.Component {
 
     this.state = {
       isValidUserName: true,
-      isSubmitButtonDisabled: false,
+      isSubmittingDisabled: false,
       selectedLang: {},
     };
     // this.checkUserName = this.checkUserName.bind(this);
 
-    this.clickHandler = this.clickHandler.bind(this);
+    this.submitHandler = this.submitHandler.bind(this);
   }
 
   componentWillMount() {
@@ -42,11 +42,17 @@ class InstallerForm extends React.Component {
     this.setState({ selectedLang: meta });
   }
 
-  clickHandler() {
-    this.setState({ isSubmitButtonDisabled: true });
+  submitHandler() {
+    if (this.state.isSubmittingDisabled) {
+      return;
+    }
+
+    this.setState({ isSubmittingDisabled: true });
     setTimeout(() => {
-      this.setState({ isSubmitButtonDisabled: false });
+      this.setState({ isSubmittingDisabled: false });
     }, 3000);
+
+    document['register-form'].submit();
   }
 
   render() {
@@ -66,7 +72,7 @@ class InstallerForm extends React.Component {
           </div>
         </div>
         <div className="row">
-          <form role="form" action="/installer" method="post" id="register-form" className="col-md-12">
+          <form role="form" action="/installer" method="post" id="register-form" className="col-md-12" onSubmit={this.submitHandler}>
             <div className="dropdown mb-3">
               <div className="d-flex dropdown-with-icon">
                 <i className="icon-bubbles border-0 rounded-0" />
@@ -163,8 +169,7 @@ class InstallerForm extends React.Component {
                 type="submit"
                 className="btn-fill btn btn-register"
                 id="register"
-                disabled={this.state.isSubmitButtonDisabled}
-                onClick={this.clickHandler}
+                disabled={this.state.isSubmittingDisabled}
               >
                 <div className="eff"></div>
                 <span className="btn-label"><i className="icon-user-follow" /></span>