+ $("#openid_url").prop("disabled", false);
+}
+
+function disableOpenID()
+{
+ $("#openid_prompt").show();
+
+ $("#openid_spacer").hide();
+ $("#openid_field").hide();
+ $("#openid_note").hide();
+
+ $("#openid_url").prop("disabled", true);
+}
+
+$(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 -%>
+});
+</script>