From: Tom Hughes Date: Wed, 5 Aug 2020 20:50:08 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/2667' X-Git-Tag: live~2019 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c24c2e481cc6d27e76274ed4e32668a4690a7788?hp=2d73dc22a2c167b9ac1140e68129af97560b6646 Merge remote-tracking branch 'upstream/pull/2667' --- diff --git a/Gemfile b/Gemfile index 540f61634..cfe734b94 100644 --- a/Gemfile +++ b/Gemfile @@ -44,6 +44,7 @@ gem "actionpack-page_caching", ">= 1.2.0" gem "active_record_union" gem "activerecord-import" gem "bootstrap", "~> 4.5.0" +gem "bootstrap_form", "~> 4.0" gem "cancancan" gem "composite_primary_keys", "~> 12.0.0" gem "config" diff --git a/Gemfile.lock b/Gemfile.lock index 379bab307..3b3ffaf06 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -110,6 +110,9 @@ GEM autoprefixer-rails (>= 9.1.0) popper_js (>= 1.14.3, < 2) sassc-rails (>= 2.0.0) + bootstrap_form (4.5.0) + actionpack (>= 5.2) + activemodel (>= 5.2) brakeman (4.9.0) browser (4.2.0) builder (3.2.4) @@ -484,6 +487,7 @@ DEPENDENCIES binding_of_caller bootsnap (>= 1.4.2) bootstrap (~> 4.5.0) + bootstrap_form (~> 4.0) brakeman browser bzip2-ffi diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 36b560fde..205ad8161 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,6 +16,8 @@ //= require piwik //= require richtext //= require querystring +//= require bs-custom-file-input +//= require bs-custom-file-input-init /* * Called as the user scrolls/zooms around to manipulate hrefs of the diff --git a/app/assets/javascripts/bs-custom-file-input-init.js b/app/assets/javascripts/bs-custom-file-input-init.js new file mode 100644 index 000000000..3afdac291 --- /dev/null +++ b/app/assets/javascripts/bs-custom-file-input-init.js @@ -0,0 +1,5 @@ +/* global bsCustomFileInput */ + +$(document).ready(function () { + bsCustomFileInput.init(); +}); diff --git a/app/assets/javascripts/leaflet.layers.js b/app/assets/javascripts/leaflet.layers.js index ddcce195d..f375dc08f 100644 --- a/app/assets/javascripts/leaflet.layers.js +++ b/app/assets/javascripts/leaflet.layers.js @@ -119,7 +119,7 @@ L.OSM.layers = function (options) { .attr("class", "text-muted") .appendTo(overlaySection); - var overlays = $("