Remove 'None' from auth providers
This commit is contained in:
parent
05e5335716
commit
c3ad502f90
2 changed files with 1 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
||||||
<fieldset class="mb-3">
|
<fieldset class="mb-3">
|
||||||
<label for="user_auth_provider" class="form-label"><%= t(".external auth") %></label>
|
<label for="user_auth_provider" class="form-label"><%= t(".external auth") %></label>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<%= f.select(:auth_provider, Auth.providers, :hide_label => true, :wrapper => { :class => "col-auto mb-0" }) %>
|
<%= f.select(:auth_provider, { t("auth.providers.none") => "" }.merge(Auth.providers), :hide_label => true, :wrapper => { :class => "col-auto mb-0" }) %>
|
||||||
<%= f.text_field(:auth_uid, :hide_label => true, :wrapper => { :class => "col mb-0" }) %>
|
<%= f.text_field(:auth_uid, :hide_label => true, :wrapper => { :class => "col mb-0" }) %>
|
||||||
</div>
|
</div>
|
||||||
<small class="form-text text-body-secondary">(<a href="<%= t ".openid.link" %>" target="_new"><%= t ".openid.link text" %></a>)</small>
|
<small class="form-text text-body-secondary">(<a href="<%= t ".openid.link" %>" target="_new"><%= t ".openid.link text" %></a>)</small>
|
||||||
|
|
|
@ -3,7 +3,6 @@ module Auth
|
||||||
|
|
||||||
def self.providers
|
def self.providers
|
||||||
@providers[I18n.locale] ||= {
|
@providers[I18n.locale] ||= {
|
||||||
I18n.t("auth.providers.none") => "",
|
|
||||||
I18n.t("auth.providers.openid") => "openid"
|
I18n.t("auth.providers.openid") => "openid"
|
||||||
}.tap do |providers|
|
}.tap do |providers|
|
||||||
providers[I18n.t("auth.providers.google")] = "google" if Settings.key?(:google_auth_id)
|
providers[I18n.t("auth.providers.google")] = "google" if Settings.key?(:google_auth_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue