From f69abaa9cfba28892022910cddd5d0d8c3e19ba7 Mon Sep 17 00:00:00 2001
From: Tom Hughes
Date: Fri, 24 Sep 2010 10:20:37 +0100
Subject: [PATCH] Make terms page work during OpenID based signup
---
app/views/user/terms.html.erb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/views/user/terms.html.erb b/app/views/user/terms.html.erb
index cd8da54da..3e93ff20c 100644
--- a/app/views/user/terms.html.erb
+++ b/app/views/user/terms.html.erb
@@ -13,7 +13,7 @@
:before => update_page do |page|
page.replace_html 'contributorTerms', image_tag('searching.gif')
end,
- :url => {:legale => legale, :has_decline => params.has_key?(:user)}
+ :url => {:legale => legale, :has_decline => @user.new_record?}
)
%>
<%= label_tag "legale_#{legale}", t('user.terms.legale_names.' + name) %>
@@ -22,7 +22,7 @@
<% end %>
- <%= render :partial => "terms", :locals => { :has_decline =>params.has_key?(:user) } %>
+ <%= render :partial => "terms", :locals => { :has_decline => @user.new_record? } %>
<% form_tag({:action => "save"}, { :id => "termsForm" }) do %>
@@ -33,7 +33,7 @@
<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %>
- <% if params[:user] %>
+ <% if @user.new_record? %>
<%= hidden_field('user', 'email') %>
<%= hidden_field('user', 'email_confirmation') %>
<%= hidden_field('user', 'display_name') %>
@@ -42,7 +42,7 @@
<%= hidden_field('user', 'openid_url') %>
<% end %>
- <% if params[:user] %>
+ <% if @user.new_record? %>
<%= submit_tag(t('user.terms.decline'), :name => "decline", :id => "decline") %>
<% end %>
<%= submit_tag(t('user.terms.agree'), :name => "agree", :id => "agree") %>
--
2.39.5