|
|
@@ -5,7 +5,7 @@
|
|
|
{% set nameForIsGoogleEnabled = "settingForm[security:passport-google:isEnabled]" %}
|
|
|
{% set isGoogleEnabled = settingForm['security:passport-google:isEnabled'] %}
|
|
|
<div class="form-group">
|
|
|
- <label for="{{nameForIsGoogleEnabled}}" class="col-xs-3 control-label">Use Google OAuth</label>
|
|
|
+ <label for="{{nameForIsGoogleEnabled}}" class="col-xs-3 control-label">{{ t("security_setting.Google_OAuth.use_Google_OAuth") }}</label>
|
|
|
<div class="col-xs-6">
|
|
|
<div class="btn-group btn-toggle" data-toggle="buttons">
|
|
|
<label class="btn btn-default btn-rounded btn-outline {% if isGoogleEnabled %}active{% endif %}" data-active-class="primary">
|
|
|
@@ -20,16 +20,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<fieldset id="passport-google-hide-when-disabled" {%if !isGoogleEnabled %}style="display: none;"{% endif %}>
|
|
|
- <h4>{{ t("security_setting.google_setting") }}</h4>
|
|
|
- <ol class="help-block">
|
|
|
- <li>{{ t("security_setting.access_api_manager") }}</li>
|
|
|
- <li>{{ t("security_setting.create_project") }}</li>
|
|
|
- <li>{{ t("security_setting.create_auth_to_oauth") }}</li>
|
|
|
- <ol>
|
|
|
- <li>{{ t("security_setting.select_webapp") }}</li>
|
|
|
- <li>{{ t("security_setting.change_redirect_url") }}</li>
|
|
|
- </ol>
|
|
|
- </ol>
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="settingForm[security:passport-google:clientId]" class="col-xs-3 control-label">{{ t("security_setting.google_setting") }}</label>
|
|
|
+ <div class="col-xs-6">
|
|
|
+ <ol class="help-block">
|
|
|
+ <li>{{ t("security_setting.access_api_manager") }}</li>
|
|
|
+ <li>{{ t("security_setting.create_project") }}</li>
|
|
|
+ <li>{{ t("security_setting.create_auth_to_oauth") }}</li>
|
|
|
+ <ol>
|
|
|
+ <li>{{ t("security_setting.select_webapp") }}</li>
|
|
|
+ <li>{{ t("security_setting.Google_OAuth.change_redirect_url") }}</li>
|
|
|
+ </ol>
|
|
|
+ </ol>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label for="settingForm[security:passport-google:clientId]" class="col-xs-3 control-label">{{ t("security_setting.clientID") }}</label>
|
|
|
@@ -67,13 +72,6 @@
|
|
|
<div class="col-xs-offset-3 col-xs-6">
|
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
<button type="submit" class="btn btn-primary">{{ t('Update') }}</button>
|
|
|
- <button type="button"
|
|
|
- class="btn btn-default passport-google-hide-when-disabled"
|
|
|
- data-target="#test-google-account" data-toggle="modal"
|
|
|
- {%if !isGoogleEnabled %}style="display: none;"{% endif %}>
|
|
|
-
|
|
|
- {{ t("security_setting.ldap.test_config") }}
|
|
|
- </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -154,25 +152,6 @@
|
|
|
</ol>
|
|
|
{% endif %}
|
|
|
|
|
|
-<div class="modal test-google-account" id="test-google-account">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
-
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
- <div class="modal-title">Test Google Account</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="modal-body">
|
|
|
-
|
|
|
- {% include '../../../widget/passport/ldap-association-tester.html' with { showLog: true } %}
|
|
|
-
|
|
|
- </div><!-- /.modal-body -->
|
|
|
-
|
|
|
- </div><!-- /.modal-content -->
|
|
|
- </div><!-- /.modal-dialog -->
|
|
|
-</div><!-- /.modal -->
|
|
|
-
|
|
|
<script>
|
|
|
$('input[name="settingForm[security:passport-google:isEnabled]"]').change(function() {
|
|
|
const isEnabled = ($(this).val() === "true");
|