]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/terms.html.erb
Update terms form to use bootstrap
[rails.git] / app / views / users / terms.html.erb
index b3e42189be18ae6f6c155c85cd02a51bd4ce0c30..99af8b84185e6a3da2b8cd3dccb75f19372ff39e 100644 (file)
@@ -7,22 +7,21 @@
   <div class='header-illustration new-user-terms'></div>
 <% end %>
 
-<%= form_tag({ :action => "save" }, { :class => "standard-form fillL" }) do %>
+<%= form_tag({ :action => "save" }) do %>
   <!-- legale is <%= @legale %> -->
   <p class="text-muted"><%= t ".read and accept with tou" %></p>
   <h4>
     <%= t ".heading_ct" %>
   </h4>
-  <div class='standard-form-row horizontal-list clearfix'>
-    <p class="text-muted"><%= t ".contributor_terms_explain" %></p>
-    <label class="standard-label">
-      <%= t ".legale_select" %>
-    </label>
-
+  <p class="text-muted"><%= t ".contributor_terms_explain" %></p>
+  <label>
+    <%= t ".legale_select" %>
+  </label>
+  <div class="form-group">
     <% [%w[france FR], %w[italy IT], %w[rest_of_world GB]].each do |name, legale| %>
-      <div class="standard-form-row">
-        <label for="legale_<%= legale %>">
-          <%= radio_button_tag "legale", legale, @legale == legale, :data => { :url => url_for(:legale => legale) } %>
+      <div class="form-check form-check-inline">
+        <%= radio_button_tag "legale", legale, @legale == legale, :data => { :url => url_for(:legale => legale) }, :class => "form-check-input" %>
+        <label for="legale_<%= legale %>" class="form-check-label">
           <%= t(".legale_names.#{name}") %>
         </label>
       </div>
             :translations => "https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations" %>
     </p>
   </div>
-  <div class="standard-form-row">
-    <label for="read_ct">
-      <%= check_box_tag "read_ct" %>
-      <%= t ".read_ct" %>
-    </label>
+  <div class="form-group">
+    <div class="form-check">
+      <%= check_box_tag "read_ct", "1", false, :class => "form-check-input" %>
+      <label for="read_ct" class="form-check-label">
+        <%= t ".read_ct" %>
+      </label>
+    </div>
   </div>
 
   <h4>
     <%= t "layouts.tou" %>
   </h4>
   <p class="text-muted"><%= t ".tou_explain_html", :tou_link => link_to(t("layouts.tou"), "https://wiki.osmfoundation.org/wiki/Terms_of_Use", :target => :new) %></p>
-  <div class="standard-form-row">
-    <label for="read_tou">
-      <%= check_box_tag "read_tou" %>
-      <%= t ".read_tou" %>
-    </label>
-
-    <%= hidden_field_tag("referer", h(params[:referer])) unless params[:referer].nil? %>
 
-    <div class="buttons standard-form-row py-3 clearfix">
-      <%= submit_tag("Continue", :name => "continue", :id => "continue", :disabled => true) %>
-      <%= submit_tag("Cancel", :name => "decline", :id => "decline") %>
+  <div class="form-group">
+    <div class="form-check">
+      <%= check_box_tag "read_tou", "1", false, :class => "form-check-input" %>
+      <label for="read_tou" class="form-check-label">
+        <%= t ".read_tou" %>
+      </label>
     </div>
+  </div>
+
+  <%= hidden_field_tag("referer", h(params[:referer])) unless params[:referer].nil? %>
 
-    <label for="user_consider_pd">
-      <%= check_box("user", "consider_pd") %>
+  <div class="form-group">
+    <%= submit_tag("Continue", :name => "continue", :id => "continue", :disabled => true, :class => "btn btn-primary") %>
+    <%= submit_tag("Cancel", :name => "decline", :id => "decline", :class => "btn btn-outline-secondary") %>
+  </div>
+
+  <div class="form-group">
+    <div class="form-check">
+      <%= check_box("user", "consider_pd", :class => "form-check-input") %>
+    <label for="user_consider_pd" class="form-check-label">
       <%= t ".consider_pd" %>
     </label>
     <span class="minorNote">(<%= link_to(t(".consider_pd_why"), t(".consider_pd_why_url"), :target => :new) %>)</span>
-
   </div>
 <% end %>