diff --git a/app/views/hooks/_view_account_login_bottom.html.erb b/app/views/hooks/_view_account_login_bottom.html.erb index c3de12b..a2238b5 100644 --- a/app/views/hooks/_view_account_login_bottom.html.erb +++ b/app/views/hooks/_view_account_login_bottom.html.erb @@ -22,6 +22,12 @@ <% if Setting.plugin_redmine_oauth[:button_icon] != 'none' %> <%= stylesheet_link_tag 'redmine_oauth', plugin: 'redmine_oauth' %> + <% if Setting.plugin_redmine_oauth[:hide_login_form] %> + <%= javascript_include_tag('redmine_oauth.js', plugin: :redmine_oauth) %> +
+ <%= l(:button_login) %> +
+ <% end %> <%= form_tag(oauth_path(back_url: back_url), method: :get, id: 'oauth-login') do %> <%= back_url_hidden_field_tag %> <%= button_tag(name: 'login-oauth', tabindex: 6, id: 'login-oauth-submit', title: l(:oauth_login_with), @@ -53,6 +59,8 @@ }); <%# Hidden login form %> <% if Setting.plugin_redmine_oauth[:hide_login_form] %> - $('div#login-form').hide(); + let login_form = $('div#login-form'); + login_form.appendTo('#oauth-fieldset-login-form'); + login_form.toggle(); <% end %> <% end %> diff --git a/app/views/settings/_oauth_settings.html.erb b/app/views/settings/_oauth_settings.html.erb index cffc5ef..49d249e 100644 --- a/app/views/settings/_oauth_settings.html.erb +++ b/app/views/settings/_oauth_settings.html.erb @@ -35,7 +35,7 @@ ], @settings[:oauth_name]), onchange: 'oauth_settings_visibility()' %> <%= l(:oauth_provider_info) %>

-
+

@@ -95,11 +95,8 @@ <%= check_box_tag 'settings[hide_login_form]', true, @settings[:hide_login_form] %> <%= l(:label_default)%>: <%= l(:general_text_No)%>

- <% if %w(Custom).include?(@settings[:oauth_name]) %> -
- <% else %> -