From: Anton Khorev Date: Thu, 18 Jul 2024 12:30:08 +0000 (+0300) Subject: Remove 'None' from auth providers X-Git-Tag: live~360^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/c3ad502f90363f3507a86fd1bcc778b98c7118e2 Remove 'None' from auth providers --- diff --git a/app/views/accounts/edit.html.erb b/app/views/accounts/edit.html.erb index f15bc195c..a3e6f943b 100644 --- a/app/views/accounts/edit.html.erb +++ b/app/views/accounts/edit.html.erb @@ -19,7 +19,7 @@
- <%= 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" }) %>
(" target="_new"><%= t ".openid.link text" %>) diff --git a/lib/auth.rb b/lib/auth.rb index 01167fb1d..729772477 100644 --- a/lib/auth.rb +++ b/lib/auth.rb @@ -3,7 +3,6 @@ module Auth def self.providers @providers[I18n.locale] ||= { - I18n.t("auth.providers.none") => "", I18n.t("auth.providers.openid") => "openid" }.tap do |providers| providers[I18n.t("auth.providers.google")] = "google" if Settings.key?(:google_auth_id)