mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
added option to enable/disable login buttons individually
This commit is contained in:
parent
416f981f92
commit
b0f3a74a1f
3 changed files with 25 additions and 5 deletions
|
@ -1,10 +1,18 @@
|
|||
<div class="modal-body">
|
||||
<div id="login-buttons">
|
||||
<button class="btn btn-social google" title="{{i18n login.google.title}}" {{action openidLogin "google" target="view"}}>{{i18n login.google.title}}</button>
|
||||
<button class="btn btn-social facebook" title="{{i18n login.facebook.title}}" {{action "facebookLogin" target="view"}}>{{i18n login.facebook.title}}</button>
|
||||
{{#if Discourse.SiteSettings.enable_google_logins}}
|
||||
<button class="btn btn-social google" title="{{i18n login.google.title}}" {{action openidLogin "google" target="view"}}>{{i18n login.google.title}}</button>
|
||||
{{/if}}
|
||||
{{#if Discourse.SiteSettings.enable_facebook_logins}}
|
||||
<button class="btn btn-social facebook" title="{{i18n login.facebook.title}}" {{action "facebookLogin" target="view"}}>{{i18n login.facebook.title}}</button>
|
||||
{{/if}}
|
||||
<br>
|
||||
<button class="btn btn-social twitter" title="{{i18n login.twitter.title}}" {{action "twitterLogin" target="view"}}>{{i18n login.twitter.title}}</button>
|
||||
<button class="btn btn-social yahoo" title="{{i18n login.yahoo.title}}" {{action openidLogin "yahoo" target="view"}}>{{i18n login.yahoo.title}}</button>
|
||||
{{#if Discourse.SiteSettings.enable_twitter_logins}}
|
||||
<button class="btn btn-social twitter" title="{{i18n login.twitter.title}}" {{action "twitterLogin" target="view"}}>{{i18n login.twitter.title}}</button>
|
||||
{{/if}}
|
||||
{{#if Discourse.SiteSettings.enable_yahoo_logins}}
|
||||
<button class="btn btn-social yahoo" title="{{i18n login.yahoo.title}}" {{action openidLogin "yahoo" target="view"}}>{{i18n login.yahoo.title}}</button>
|
||||
{{/if}}
|
||||
{{#if Discourse.SiteSettings.enable_github_logins}}
|
||||
<button class="btn btn-social github" title="{{i18n login.github.title}}" {{action "githubLogin" target="view"}}>{{i18n login.github.title}}</button>
|
||||
{{/if}}
|
||||
|
|
|
@ -110,9 +110,14 @@ class SiteSetting < ActiveRecord::Base
|
|||
|
||||
setting(:send_welcome_message, true)
|
||||
|
||||
client_setting(:enable_google_logins, true)
|
||||
client_setting(:enable_yahoo_logins, true)
|
||||
|
||||
client_setting(:enable_twitter_logins, true)
|
||||
setting(:twitter_consumer_key, '')
|
||||
setting(:twitter_consumer_secret, '')
|
||||
|
||||
client_setting(:enable_facebook_logins, true)
|
||||
setting(:facebook_app_id, '')
|
||||
setting(:facebook_app_secret, '')
|
||||
|
||||
|
|
|
@ -308,17 +308,24 @@ en:
|
|||
invite_expiry_days: "How long user invitation keys are valid, in days"
|
||||
|
||||
# TODO: perhaps we need a way of protecting these settings for hosted solution, global settings ...
|
||||
|
||||
enable_google_logins: "Enable Google authentication"
|
||||
enable_yahoo_logins: "Enable Yahoo authentication"
|
||||
|
||||
enable_twitter_logins: "Enable Twitter authentication, requires twitter_consumer_key and twitter_consumer_secret"
|
||||
twitter_consumer_key: "Consumer key for Twitter authentication, registered at http://dev.twitter.com"
|
||||
twitter_consumer_secret: "Consumer secret for Twitter authentication, registered at http://dev.twitter.com"
|
||||
|
||||
enable_facebook_logins: "Enable Facebook authentication, requires facebook_app_id and facebook_app_secret"
|
||||
facebook_app_id: "App id for Facebook authentication, registered at https://developers.facebook.com/apps"
|
||||
facebook_app_secret: "App secret for Facebook authentication, registered at https://developers.facebook.com/apps"
|
||||
|
||||
allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
|
||||
enable_github_logins: "Enable Github authentication, requires github_client_id and github_client_secret"
|
||||
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications"
|
||||
github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications"
|
||||
|
||||
allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
|
||||
|
||||
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
|
||||
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"
|
||||
|
||||
|
|
Loading…
Reference in a new issue