index.html.erb 1.26 KB
<h1><%= _('Oauth Client Settings') %></h1>

<%= labelled_form_for @config, url: { action: "update_configs" } do |f| %>
  <table>
    <tr>
      <%= hidden_field_tag "oauth_client_config[allow_external_login]", false %>
      <td><%= _('Allow external login') %></td>
      <td><%= check_box_tag "oauth_client_config[allow_external_login]", true, @config.allow_external_login %></td>
    </tr>
  </table>

  <div>
    <%= button_bar do %>
      <%= submit_button('save', _('Save changes')) %>
      <%= button :back, _('Back to plugins panel'), :controller => 'plugins', :action => 'index' %>
    <% end %>
  </div>
<% end %>

<h3><%= _('Providers') %></h3>
<%= button :add, _('New'), {:action => 'new'} %>
<table>
  <tr>
    <th><%= _('Name') %></th>
    <th><%= _('Strategy') %></th>
    <th><%= _('Actions') %></th>
  </tr>

  <% environment.oauth_providers.each do |provider| %>
    <tr>
      <td><%= provider.name %></td>
      <td><%= provider.strategy %></td>
      <td>
        <%= link_to _('Edit'), {:action => 'edit', :id => provider.id} %>
        <%= link_to _('Remove'), {:action => 'remove', :id => provider.id} %>
      </td>
    </tr>
  <% end %>
</table>
<div class="actions">
  <%= button(:back, _('Go back'), {:controller => 'plugins', :action => 'index'}) %>
</div>