diff --git a/app/views/shared/_sign_in_form.html.erb b/app/views/shared/_sign_in_form.html.erb index e032ead..2d57bc6 100644 --- a/app/views/shared/_sign_in_form.html.erb +++ b/app/views/shared/_sign_in_form.html.erb @@ -1,22 +1,4 @@ <%= form_for resource, as: 'user', url: user_session_path, html: {id: "sign_in_form"} do |f| %> - <% if Rails.application.config.shibboleth_enabled %> - -

<%= _('Sign in with') %>

- -
- - <% if request.fullpath != "/users/sign_up?nosplash=true" && session[:shibboleth_data].nil? then%> - <% target = (Rails.application.config.shibboleth_use_filtered_discovery_service ? shibboleth_ds_path : user_shibboleth_omniauth_authorize_path) %> - <%= _('Your Institution') %> - <%else%> - <%= f.hidden_field :shibboleth_id, :value => session[:shibboleth_data][:uid] %> - <%end%> - -
- -

- <%= _('or') %> -

- <% end %> -
<%= f.label(:email, _('Email'), class: 'control-label') %> <%= f.email_field(:email, class: 'form-control', "aria-required": true) %> @@ -38,4 +20,19 @@
<%= link_to _('Forgot password?'), new_password_path('user') %>
+ + <% if Rails.application.config.shibboleth_enabled %> +

- <%= _('or') %> -

+ +
+ + <% if request.fullpath != "/users/sign_up?nosplash=true" && session[:shibboleth_data].nil? then%> + <% target = (Rails.application.config.shibboleth_use_filtered_discovery_service ? shibboleth_ds_path : user_shibboleth_omniauth_authorize_path) %> + <%= _('Sign in with your institutional credentials') %> + <%else%> + <%= f.hidden_field :shibboleth_id, :value => session[:shibboleth_data][:uid] %> + <%end%> + +
+ <% end %> <% end %> diff --git a/config/application.rb b/config/application.rb index 9e5c35c..4444622 100644 --- a/config/application.rb +++ b/config/application.rb @@ -63,7 +63,7 @@ # Enable shibboleth as an alternative authentication method # Requires server configuration and omniauth shibboleth provider configuration # See config/initializers/devise.rb - config.shibboleth_enabled = false + config.shibboleth_enabled = true # Relative path to Shibboleth SSO Logout config.shibboleth_login = '/Shibboleth.sso/Login'