cirandas.net

ref: master

plugins/oauth_client/views/oauth_client_plugin_admin/edit.html.erb


<%= _('Oauth Client Settings') %>

<%= _('Edit Provider') %>

<%= form_for @provider, :url => {:action => 'edit', :id => @provider.id}, :method => 'post' do |f| %>
<%= labelled_form_field f.check_box(:enabled) + _('Enabled'), '' %>
<%= labelled_form_field _('Name'), f.text_field(:name) %>
<%= labelled_form_field _('Strategy'), f.select(:strategy, OauthClientPlugin::PROVIDERS) %>
<%= labelled_form_field _('Client Id'), f.text_field(:client_id) %>
<%= labelled_form_field _('Client Secret'), f.text_field(:client_secret) %>
<% if File.exists?(File.join(File.dirname(__FILE__), "_#{@provider.strategy}.html.erb")) %> <%= render :partial => "#{@provider.strategy}", :locals => {:f => f, :provider => @provider} %> <% end %>
<%= f.fields_for :image_builder, @provider.image do |i| %> <%= file_field_or_thumbnail(_('Image:'), @provider.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> <% end %>
<%= button_bar do %> <%= submit_button(:save, _('Save'), :cancel => {:action => 'index'}) %> <% end %> <% end %>