diff --git a/plugins/oauth_client/lib/oauth_client_plugin.rb b/plugins/oauth_client/lib/oauth_client_plugin.rb
index 7110ff6..c2a1d11 100644
--- a/plugins/oauth_client/lib/oauth_client_plugin.rb
+++ b/plugins/oauth_client/lib/oauth_client_plugin.rb
@@ -66,7 +66,7 @@ class OauthClientPlugin < Noosfero::Plugin
provider provider, :setup => setup,
:path_prefix => '/plugin/oauth_client',
:callback_path => "/plugin/oauth_client/public/callback/#{provider}",
- :client_options => { :connection_opts => { :proxy => ENV["HTTP_PROXY"] || ENV["http_proxy"] || ENV["HTTPS_PROXY"] || ENV["https_proxy"] } }
+ :client_options => { :connection_opts => { :proxy => ENV["OAUTH_HTTP_PROXY"] } }
end
unless Rails.env.production?
diff --git a/plugins/oauth_client/views/oauth_client_plugin_admin/_noosfero_oauth2.html.erb b/plugins/oauth_client/views/oauth_client_plugin_admin/_noosfero_oauth2.html.erb
index 758e89b..6928d7a 100644
--- a/plugins/oauth_client/views/oauth_client_plugin_admin/_noosfero_oauth2.html.erb
+++ b/plugins/oauth_client/views/oauth_client_plugin_admin/_noosfero_oauth2.html.erb
@@ -1,6 +1,5 @@
<%= f.fields_for :client_options, OpenStruct.new(provider.options[:client_options]) do |c| %>
- <%= _('Client Url') %>
- <%= c.text_field :site %>
+ <%= labelled_form_field _('Client Url'), c.text_field(:site) %>
<% end %>
diff --git a/plugins/oauth_client/views/oauth_client_plugin_admin/edit.html.erb b/plugins/oauth_client/views/oauth_client_plugin_admin/edit.html.erb
index 5725454..0848bf9 100644
--- a/plugins/oauth_client/views/oauth_client_plugin_admin/edit.html.erb
+++ b/plugins/oauth_client/views/oauth_client_plugin_admin/edit.html.erb
@@ -4,56 +4,35 @@
<%= form_for @provider, :url => {:action => 'edit'}, :method => 'post' do |f| %>
- <%= f.check_box :enabled %>
- <%= _('Enabled') %>
+ <%= labelled_form_field f.check_box(:enabled) + _('Enabled'), '' %>
-
- <%= _('Name') %>
-
-
- <%= f.text_field :name %>
-
+ <%= labelled_form_field _('Name'), f.text_field(:name) %>
-
- <%= _('Strategy') %>
-
-
- <%= f.select :strategy, OauthClientPlugin::PROVIDERS %>
-
-
-
-
- <%= 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 %>
+ <%= labelled_form_field _('Strategy'), f.select(:strategy, OauthClientPlugin::PROVIDERS) %>
-
- <%= _('Client Id') %>
-
-
- <%= f.text_field :client_id %>
-
+ <%= labelled_form_field _('Client Id'), f.text_field(:client_id) %>
-
- <%= _('Client Secret') %>
-
-
- <%= f.text_field :client_secret %>
-
+ <%= 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 %>
diff --git a/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb b/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb
index a6df1a4..2af9ea7 100644
--- a/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb
+++ b/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb
@@ -1,6 +1,6 @@
<%= _('Oauth Client Settings') %>
<%= _('Providers') %>
-<%= link_to _('New'), {:action => 'new'} %>
+<%= button :add, _('New'), {:action => 'new'} %>
<%= _('Name') %> |
--
libgit2 0.21.2