itizawa 6 лет назад
Родитель
Сommit
9c0abbf4a8

+ 19 - 2
src/client/js/components/Admin/Security/GoogleSecuritySetting.jsx

@@ -62,8 +62,25 @@ class GoogleSecurityManagement extends React.Component {
 
 
 
 
         {adminGeneralSecurityContainer.state.isGoogleOAuthEnabled && (
         {adminGeneralSecurityContainer.state.isGoogleOAuthEnabled && (
-          // TODO
-          <p>{adminGoogleSecurityContainer.state.hoge}</p>
+          <React.Fragment>
+
+            <div className="row mb-5">
+              <label htmlFor="googleClientId" className="col-xs-3 text-right">{ t('security_setting.clientID') }</label>
+              <div className="col-xs-6">
+                <input
+                  className="form-control"
+                  type="text"
+                  name="googleClientId"
+                  value={adminGoogleSecurityContainer.state.googleClientId}
+                  onChange={e => adminGoogleSecurityContainer.changeGoogleClientId(e.target.value)}
+                />
+                <p className="help-block">
+                  <small dangerouslySetInnerHTML={{ __html: t('security_setting.Use env var if empty', { env: 'OAUTH_GOOGLE_CLIENT_ID' }) }} />
+                </p>
+              </div>
+            </div>
+
+          </React.Fragment>
         )}
         )}
 
 
         <hr />
         <hr />

+ 8 - 0
src/client/js/services/AdminGoogleSecurityContainer.js

@@ -19,6 +19,7 @@ export default class AdminGoogleSecurityContainer extends Container {
     this.state = {
     this.state = {
       // TODO GW-583 set value
       // TODO GW-583 set value
       appSiteUrl: '',
       appSiteUrl: '',
+      googleClientId: '',
     };
     };
 
 
     this.init();
     this.init();
@@ -36,4 +37,11 @@ export default class AdminGoogleSecurityContainer extends Container {
     return 'AdminGoogleSecurityContainer';
     return 'AdminGoogleSecurityContainer';
   }
   }
 
 
+  /**
+   * Change googleClientId
+   */
+  changeGoogleClientId(value) {
+    this.setState({ googleClientId: value });
+  }
+
 }
 }