From: Thomas Levine Date: Mon, 10 Jun 2013 19:09:38 +0000 (-0400) Subject: Refactor contributor terms using new form styles X-Git-Tag: live~4893 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f3b319cb4f9521ca2fb1f514c8b368bd894bab3b Refactor contributor terms using new form styles --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index c05262b69..599cce32d 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1236,45 +1236,50 @@ ul.results-list li { border-bottom: 1px solid #ccc; } /* Rules for the account confirmation page */ -div#contributorTerms { - border: 1px solid #ccc; - padding: 20px; - margin-bottom: 20px; - overflow: auto; - height: 398px; -} - -div#contributorTerms p#last { - margin-bottom: 0px; -} - -div#contributorTerms ol { - margin-bottom: 0px; -} - -div#contributorTerms img { - display: block; - margin: 20px auto inherit auto; -} - -form#termsForm div#buttons { - float: right; -} - -form#termsForm input#agree { - margin-left: 40px; -} - -div#slim_content form#termsForm { - width: auto; -} - -p#contributorGuidance { - background-color: #f4f4ff; - border-radius: 4px; - -moz-border-radius: 4px; - margin-top: 20px; - padding: 10px; +#terms { + .legale { + border: 1px solid #ccc; + padding: 20px; + margin-bottom: 20px; + overflow: auto; + height: 10em; + + &:p#last { + margin-bottom: 0px; + } + + &:ol { + margin-bottom: 0px; + } + + &:img { + display: block; + margin: 20px auto inherit auto; + } + } + + form.sign { + input[type=submit] { + float: left; + } + #decline { + background: #AAA; + &:hover { + background: #777; + } + } + } + fieldset { + margin-bottom: 20px; + } + #contributorGuidance { + background-color: #f4f4ff; + border-radius: 4px; + -moz-border-radius: 4px; + } + .signing-buttons { + height: 50px; + } } /* Rules for the account settings page */ diff --git a/app/views/user/terms.html.erb b/app/views/user/terms.html.erb index a2d33e36e..31cc605e7 100644 --- a/app/views/user/terms.html.erb +++ b/app/views/user/terms.html.erb @@ -2,44 +2,44 @@

<%= t 'user.terms.heading' %>

<% end %> -

<%= t 'user.terms.read and accept' %>

- - -<%= form_tag :action => 'terms' do %> -

- <%= t 'user.terms.legale_select' %> - <% [['france', 'FR'], ['italy', 'IT'], ['rest_of_world', 'GB']].each do |name,legale| %> - <%= radio_button_tag 'legale', legale, @legale == legale %> - <%= label_tag "legale_#{legale}", t('user.terms.legale_names.' + name) %> - +

+
+

<%= t 'user.terms.read and accept' %>

+ + + <%= form_tag :action => 'terms' do %> +

<%= t 'user.terms.legale_select' %>

+
+ <% [['france', 'FR'], ['italy', 'IT'], ['rest_of_world', 'GB']].each do |name,legale| %> + <%= radio_button_tag 'legale', legale, @legale == legale %> + <%= label_tag "legale_#{legale}", t('user.terms.legale_names.' + name) %> + + <% end %> +
<% end %> -

-<% end %> - -
- <%= render :partial => "terms" %> -
- -<%= form_tag({:action => "save"}, { :id => "termsForm" }) do %> -

- - <%= check_box('user', 'consider_pd') %> - (<%= link_to(t('user.terms.consider_pd_why'), t('user.terms.consider_pd_why_url'), :target => :new)%>) -

-

+

+
+ <%= render :partial => "terms" %> +
+ + <%= form_tag({:action => "save"}, { :class => "sign" }) do %> +

+ + <%= check_box('user', 'consider_pd') %> + (<%= link_to(t('user.terms.consider_pd_why'), t('user.terms.consider_pd_why_url'), :target => :new)%>) +

<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %> -
- <%= submit_tag(t('user.terms.decline'), :name => "decline", :id => "decline") %> +
<%= submit_tag(t('user.terms.agree'), :name => "agree", :id => "agree") %> + <%= submit_tag(t('user.terms.decline'), :name => "decline", :id => "decline") %>
-

-
-

<%= raw t 'user.terms.guidance', :summary => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary', :translations => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations' %>

-<% end %> +

<%= raw t 'user.terms.guidance', :summary => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary', :translations => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations' %>

+ <% end %> +