]> git.openstreetmap.org Git - rails.git/blob - app/helpers/user_helper.rb
Update oauth support for rails 3 version of oauth plugin
[rails.git] / app / helpers / user_helper.rb
1 module UserHelper
2   def openid_logo
3     image_tag "openid_small.png", :alt => t('user.login.openid_logo_alt'), :class => "openid_logo"
4   end
5
6   def openid_button(name, url)
7     link_to_function(
8       image_tag("#{name}.png", :alt => t("user.login.openid_providers.#{name}.alt")),
9       nil,
10       :title => t("user.login.openid_providers.#{name}.title")
11     ) do |page|
12       page[:login_form][:openid_url][:value] = url
13       page[:login_form].submit()
14     end
15   end
16 end