|
@@ -4,7 +4,7 @@
|
|
|
{% set nameForIsTwitterEnabled = "settingForm[security:passport-twitter:isEnabled]" %}
|
|
{% set nameForIsTwitterEnabled = "settingForm[security:passport-twitter:isEnabled]" %}
|
|
|
{% set isTwitterEnabled = getConfig('crowi', 'security:passport-twitter:isEnabled') %}
|
|
{% set isTwitterEnabled = getConfig('crowi', 'security:passport-twitter:isEnabled') %}
|
|
|
{% set siteUrl = getConfig('crowi', 'app:siteUrl') || '[INVALID]' %}
|
|
{% set siteUrl = getConfig('crowi', 'app:siteUrl') || '[INVALID]' %}
|
|
|
- {% set callbackUrl = siteUrl + '/passport/twitter/callback' %}
|
|
|
|
|
|
|
+ {% set callbackUrl = pathUtils.removeTrailingSlash(siteUrl) + '/passport/twitter/callback' %}
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="{{nameForIsTwitterEnabled}}" class="col-xs-3 control-label">{{ t("security_setting.OAuth.Twitter.name") }}</label>
|
|
<label for="{{nameForIsTwitterEnabled}}" class="col-xs-3 control-label">{{ t("security_setting.OAuth.Twitter.name") }}</label>
|
|
@@ -21,9 +21,21 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <fieldset id="passport-twitter-hide-when-disabled" {%if !isTwitterEnabled %}style="display: none;"{% endif %}>
|
|
|
|
|
|
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
|
|
|
|
|
+ <div class="col-xs-6">
|
|
|
|
|
+ <input class="form-control" type="text" value="{{ callbackUrl }}" readonly>
|
|
|
|
|
+ <p class="help-block small">{{ t("security_setting.desc_of_callback_URL", 'OAuth') }}</p>
|
|
|
|
|
+ {% if !getConfig('crowi', 'app:siteUrl') %}
|
|
|
|
|
+ <div class="alert alert-danger">
|
|
|
|
|
+ <i class="icon-exclamation"></i> {{ t("security_setting.alert_siteUrl_is_not_set", '<a href="/admin/app">' + t('App settings') + '<i class="icon-login"></i></a>') }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
+ <fieldset id="passport-twitter-hide-when-disabled" {%if !isTwitterEnabled %}style="display: none;"{% endif %}>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="settingForm[security:passport-twitter:consumerKey]" class="col-xs-3 control-label">{{ t("security_setting.clientID") }}</label>
|
|
<label for="settingForm[security:passport-twitter:consumerKey]" class="col-xs-3 control-label">{{ t("security_setting.clientID") }}</label>
|
|
@@ -49,20 +61,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label class="col-xs-3 control-label">{{ t("security_setting.callback_URL") }}</label>
|
|
|
|
|
- <div class="col-xs-6">
|
|
|
|
|
- <input class="form-control" type="text" value="{{ callbackUrl }}" readonly>
|
|
|
|
|
- <p class="help-block small">{{ t("security_setting.desc_of_callback_URL", 'OAuth') }}</p>
|
|
|
|
|
- {% if !getConfig('crowi', 'app:siteUrl') %}
|
|
|
|
|
- <div class="alert alert-danger">
|
|
|
|
|
- <i class="icon-exclamation"></i> {{ t("security_setting.alert_siteUrl_is_not_set", '<a href="/admin/app">' + t('App settings') + '<i class="icon-login"></i></a>') }}
|
|
|
|
|
- </div>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<div class="col-xs-6 col-xs-offset-3">
|
|
<div class="col-xs-6 col-xs-offset-3">
|
|
|
<div class="checkbox checkbox-info">
|
|
<div class="checkbox checkbox-info">
|