]> git.openstreetmap.org Git - rails.git/blob - app/helpers/user_helper.rb
006a3d32f887213e11ddb057d4ccf13aecfbbff1
[rails.git] / app / helpers / user_helper.rb
1 module UserHelper
2   def openid_button(name, url)
3     link_to_function(
4       image_tag("#{name}.png", :alt => t("user.login.openid_providers.#{name}.alt")),
5       nil,
6       :title => t("user.login.openid_providers.#{name}.title")
7     ) do |page|
8       page[:login_form][:user_openid_url][:value] = url
9       page[:login_form].submit()
10     end
11   end
12 end