From 05dd681abf576760e4161be1d781be6d45d59fef Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 3 Feb 2021 11:49:27 +0000 Subject: [PATCH] Refactor the export form to use bootstrap form controls I started refatoring the export inputs to use a flex grid instead of floats, but this is perhaps the one place on the whole site where left/right makes sense since even in rtl we want min_lon on the left. --- app/assets/stylesheets/common.scss | 10 ++-------- app/views/site/export.html.erb | 18 +++++++++--------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index e3c8ff202..3a8b97fbc 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1005,9 +1005,8 @@ tr.turn:hover { .export_area_inputs { margin-bottom: $lineheight/2; input[type="text"] { - width: 80px; + width: 100px; text-align: center; - margin-bottom: 5px; } } @@ -1025,18 +1024,13 @@ tr.turn:hover { float: right; /* no-r2 */ margin-right: -1px; } - #minlat { margin-bottom: 0; } + #minlat { margin-bottom: -1px; } } .export_bound { margin: $lineheight/4; } - .export_button { - margin-top: $lineheight; - margin-bottom: $lineheight; - } - dl { padding-left: $lineheight/2; dd { diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb index 934b56a02..d6db3908b 100644 --- a/app/views/site/export.html.erb +++ b/app/views/site/export.html.erb @@ -2,17 +2,17 @@ <%= render "sidebar_header", :title => t(".title") %> -<%= form_tag({ :controller => "export", :action => "finish" }, { :class => "export_form standard-form" }) do %> +<%= form_tag({ :controller => "export", :action => "finish" }, { :class => "export_form" }) do %> <%= hidden_field_tag "format", "osm" %>
- <%= text_field_tag("maxlat", nil, :size => 10, :class => "export_bound") %> -
- <%= text_field_tag("minlon", nil, :size => 10, :class => "export_bound") %> - <%= text_field_tag("maxlon", nil, :size => 10, :class => "export_bound") %> -

- <%= text_field_tag("minlat", nil, :size => 10, :class => "export_bound") %> + <%= text_field_tag("maxlat", nil, :size => 10, :class => "export_bound form-control mx-auto") %> +
+ <%= text_field_tag("minlon", nil, :size => 10, :class => "export_bound form-control") %> + <%= text_field_tag("maxlon", nil, :size => 10, :class => "export_bound form-control") %> +
+ <%= text_field_tag("minlat", nil, :size => 10, :class => "export_bound form-control mx-auto") %>
<%= t ".manually_select" %>
@@ -27,8 +27,8 @@
-
- <%= submit_tag t(".export_button") %> +
+ <%= submit_tag t(".export_button"), :class => "btn btn-primary mx-auto" %>

<%= t ".too_large.advice" %>

-- 2.45.2