X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/91a9738ee8553aa71610c911e7cb3a829f035087..490226ad6d28cf9eff1fc78c7c69bef750321614:/app/views/user/new.html.erb diff --git a/app/views/user/new.html.erb b/app/views/user/new.html.erb index e8400eb90..f45072a92 100644 --- a/app/views/user/new.html.erb +++ b/app/views/user/new.html.erb @@ -51,7 +51,7 @@ - <%= link_to_function(raw(t('user.new.use openid', :logo => openid_logo)), "enableOpenID()") %> + <%= link_to raw(t("user.new.use openid", :logo => openid_logo)), "#", :id => "openid_enable" %> <%= t 'user.new.openid no password' %> @@ -88,9 +88,13 @@ function disableOpenID() $("#openid_url").prop("disabled", true); } -<% if params[:openid] or (@user and @user.openid_url and not @user.openid_url.empty?) -%> -enableOpenID(); -<% else -%> -disableOpenID(); -<% end -%> +$(document).ready(function () { + $("#openid_enable").click(enableOpenID); + + <% if params[:openid] or (@user and @user.openid_url and not @user.openid_url.empty?) -%> + enableOpenID(); + <% else -%> + disableOpenID(); + <% end -%> +});