diff --git a/.gitignore b/.gitignore index 9f55dfc25..eedeaabd1 100644 --- a/.gitignore +++ b/.gitignore @@ -36,9 +36,16 @@ # ruby version file .ruby-version +.tool-versions # .idea file for RubyMine /.idea # Ignore application configuration /config/application.yml + +# Ignore Docs generated by rdoc +/doc + +# Compiled assets +/public/assets/* diff --git a/.travis.yml b/.travis.yml index ae3cea89d..895620ed0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: ruby rvm: - - 2.4.0 + - 2.6.9 # https://docs.travis-ci.com/user/database-setup/#using-postgis services: @@ -10,7 +10,12 @@ addons: apt: packages: - postgresql-10-postgis-2.4 - + +before_install: +- curl ifconfig.co #print IP address +- openssl aes-256-cbc -K $encrypted_ee5f58ad4bd6_key -iv $encrypted_ee5f58ad4bd6_iv -in cpta_aws.pem.enc -out cpta_aws.pem -d +- chmod 600 cpta_aws.pem + before_script: - pwd - ls -a @@ -37,4 +42,10 @@ branches: only: - master - develop - \ No newline at end of file + +deploy: + provider: script + script: bash travis_deploy.sh + skip_cleanup: true + on: + branch: develop \ No newline at end of file diff --git a/Gemfile b/Gemfile index 6e7114135..fc8f56ae9 100644 --- a/Gemfile +++ b/Gemfile @@ -46,7 +46,7 @@ gem 'lograge-sql' gem 'awesome_print' gem 'haml-rails' gem 'simple_form' -gem 'bootstrap-sass', '3.2.0.4' +gem 'bootstrap-sass', '~> 3.3.6' gem 'autoprefixer-rails' gem 'jquery-ui-rails' gem 'bootstrap-datepicker-rails' @@ -56,6 +56,10 @@ gem 'phony_rails' # For normalizing phone numbers gem 'jquery-datatables-rails', '~> 3.4.0' ############################################ +### PAGINATION ############################# +# gem 'kaminari', '~> 1.2.2' +gem 'pagy', '~> 5.10.1' +############################################ ### API & SERIALIZING ###################### # ActiveModel Serializers for serving JSON via the API @@ -98,6 +102,7 @@ gem 'rgeo' gem "rgeo-proj4" gem 'activerecord-postgis-adapter' gem 'rgeo-shapefile' +gem 'geospatial-kml' gem 'dbf' gem 'rubyzip' # For unzipping shapefiles gem 'leaflet-rails' # For embedding maps @@ -140,7 +145,9 @@ group :development, :test do gem 'rspec-rails', '~> 3.5' gem 'rails-controller-testing' gem 'shoulda-matchers', require: false - gem 'factory_bot_rails' + + # Factory_bot 5.0 no longer allows static attributes. We should change our factories if we want to upgrade + gem 'factory_bot_rails', '~> 4.11' ########################################## end @@ -158,6 +165,7 @@ group :development do gem "letter_opener" gem 'rb-readline' + gem "rdoc", "~> 6.3.0" end diff --git a/Gemfile.lock b/Gemfile.lock index dde76a4b0..a9cb70782 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,106 +22,113 @@ GIT GEM remote: http://rubygems.org/ specs: - actioncable (5.0.7) - actionpack (= 5.0.7) + actioncable (5.0.7.2) + actionpack (= 5.0.7.2) nio4r (>= 1.2, < 3.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.7) - actionpack (= 5.0.7) - actionview (= 5.0.7) - activejob (= 5.0.7) + actionmailer (5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.7) - actionview (= 5.0.7) - activesupport (= 5.0.7) + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.7) - activesupport (= 5.0.7) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_model_serializers (0.10.7) - actionpack (>= 4.1, < 6) - activemodel (>= 4.1, < 6) + active_model_serializers (0.10.13) + actionpack (>= 4.1, < 7.1) + activemodel (>= 4.1, < 7.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (5.0.7) - activesupport (= 5.0.7) + activejob (5.0.7.2) + activesupport (= 5.0.7.2) globalid (>= 0.3.6) - activemodel (5.0.7) - activesupport (= 5.0.7) - activerecord (5.0.7) - activemodel (= 5.0.7) - activesupport (= 5.0.7) + activemodel (5.0.7.2) + activesupport (= 5.0.7.2) + activerecord (5.0.7.2) + activemodel (= 5.0.7.2) + activesupport (= 5.0.7.2) arel (~> 7.0) activerecord-postgis-adapter (4.1.2) activerecord (~> 5.0.0) rgeo-activerecord (~> 6.0) - activesupport (5.0.7) + activesupport (5.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) akami (1.3.1) gyoku (>= 0.4.0) nokogiri arel (7.1.4) attr_encrypted (3.0.3) encryptor (~> 3.0.0) - autoprefixer-rails (8.4.1) - execjs - awesome_print (1.8.0) - aws-partitions (1.84.0) - aws-sdk-core (3.20.2) - aws-partitions (~> 1.0) - aws-sigv4 (~> 1.0) - jmespath (~> 1.0) - aws-sdk-kms (1.5.0) - aws-sdk-core (~> 3) - aws-sigv4 (~> 1.0) - aws-sdk-s3 (1.10.0) - aws-sdk-core (~> 3) + autoprefixer-rails (10.4.7.0) + execjs (~> 2) + awesome_print (1.9.2) + aws-eventstream (1.2.0) + aws-partitions (1.629.0) + aws-sdk-core (3.146.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.525.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.58.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.114.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.0) - aws-sdk-sns (1.1.0) - aws-sdk-core (~> 3) - aws-sigv4 (~> 1.0) - aws-sigv4 (1.0.2) - bcrypt (3.1.11) - better_errors (2.4.0) + aws-sigv4 (~> 1.4) + aws-sdk-sns (1.55.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.5.1) + aws-eventstream (~> 1, >= 1.0.2) + bcrypt (3.1.18) + better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) - bindex (0.5.0) - binding_of_caller (0.8.0) + bindex (0.8.1) + binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootstrap-datepicker-rails (1.8.0.1) + bootstrap-datepicker-rails (1.9.0.1) railties (>= 3.0) - bootstrap-sass (3.2.0.4) - sass (~> 3.2) - builder (3.2.3) - byebug (10.0.2) - cancancan (2.2.0) - carrierwave (1.3.2) - activemodel (>= 4.0.0) - activesupport (>= 4.0.0) - mime-types (>= 1.16) + bootstrap-sass (3.3.7) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + builder (3.2.4) + byebug (11.1.3) + cancancan (3.4.0) + carrierwave (2.2.2) + activemodel (>= 5.0.0) + activesupport (>= 5.0.0) + addressable (~> 2.6) + image_processing (~> 1.1) + marcel (~> 1.0.0) + mini_mime (>= 0.1.3) ssrf_filter (~> 1.0) - carrierwave-aws (1.4.0) + carrierwave-aws (1.5.0) aws-sdk-s3 (~> 1.0) - carrierwave (>= 0.7, < 2.1) + carrierwave (~> 2.0) case_transform (0.2) activesupport - chartkick (2.3.4) + chartkick (4.2.1) chronic (0.10.2) - coderay (1.1.2) + coderay (1.1.3) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -129,19 +136,19 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.0.5) + concurrent-ruby (1.1.10) cookiejar (0.3.3) - crass (1.0.4) - dbf (3.1.2) - debug_inspector (0.0.3) - devise (4.4.3) + crass (1.0.6) + dbf (4.2.2) + debug_inspector (1.1.0) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 6.0) + railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.3) - em-http-request (1.1.5) + diff-lcs (1.5.0) + em-http-request (1.1.7) addressable (>= 2.3.4) cookiejar (!= 0.3.1) em-socksify (>= 0.3) @@ -150,25 +157,30 @@ GEM em-socksify (0.3.2) eventmachine (>= 1.0.0.beta.4) encryptor (3.0.0) - erubi (1.7.1) + erubi (1.11.0) erubis (2.7.0) - eventmachine (1.2.6) - execjs (2.7.0) - factory_bot (4.8.2) + eventmachine (1.2.7) + execjs (2.8.1) + factory_bot (4.11.1) activesupport (>= 3.0.0) - factory_bot_rails (4.8.2) - factory_bot (~> 4.8.2) + factory_bot_rails (4.11.1) + factory_bot (~> 4.11.1) railties (>= 3.0.0) - ffi (1.9.23) + ffi (1.15.5) figaro (1.2.0) thor (>= 0.14.0, < 2) - globalid (0.4.1) - activesupport (>= 4.2.0) - groupdate (4.0.1) - activesupport (>= 4.2) - gyoku (1.3.1) + geospatial (1.14.1) + geospatial-kml (0.5.0) + geospatial (~> 1.0) + nokogiri (~> 1.6) + globalid (1.0.0) + activesupport (>= 5.0) + groupdate (5.2.4) + activesupport (>= 5) + gyoku (1.4.0) builder (>= 2.1.2) - haml (5.0.4) + rexml (~> 3.0) + haml (5.2.2) temple (>= 0.8.0) tilt haml-rails (1.0.0) @@ -182,147 +194,158 @@ GEM haml (>= 4.0, < 6) nokogiri (>= 1.6.0) ruby_parser (~> 3.5) - http_parser.rb (0.6.0) - httpi (2.4.3) + http_parser.rb (0.8.0) + httpi (2.5.0) rack socksify - i18n (1.0.1) + i18n (1.12.0) concurrent-ruby (~> 1.0) - jbuilder (2.7.0) - activesupport (>= 4.2.0) - multi_json (>= 1.2) - jmespath (1.4.0) + image_processing (1.12.2) + mini_magick (>= 4.9.5, < 5) + ruby-vips (>= 2.0.17, < 3) + jbuilder (2.11.5) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + jmespath (1.6.1) jquery-datatables-rails (3.4.0) actionpack (>= 3.1) jquery-rails railties (>= 3.1) sass-rails - jquery-rails (4.3.3) + jquery-rails (4.5.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) - jsonapi-renderer (0.2.0) - launchy (2.4.3) - addressable (~> 2.3) - leaflet-rails (1.3.1) + jsonapi-renderer (0.2.2) + launchy (2.5.0) + addressable (~> 2.7) + leaflet-rails (1.8.0) rails (>= 4.2.0) - letter_opener (1.6.0) - launchy (~> 2.2) + letter_opener (1.8.1) + launchy (>= 2.2, < 3) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - lograge (0.11.2) + lograge (0.12.0) actionpack (>= 4) activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - lograge-sql (1.3.1) - activerecord (>= 4, < 7.0) - lograge (~> 0.4) - loofah (2.2.2) + lograge-sql (2.0.0) + activerecord (>= 5, < 7.1) + lograge (~> 0.11) + loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.0) + mail (2.7.1) mini_mime (>= 0.1.1) - method_source (0.9.0) - mime-types (3.4.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) - mini_magick (4.8.0) - mini_mime (1.0.0) - mini_portile2 (2.3.0) - minitest (5.11.3) - multi_json (1.13.1) - nio4r (2.3.1) - nokogiri (1.8.2) - mini_portile2 (~> 2.3.0) + marcel (1.0.2) + method_source (1.0.0) + mini_magick (4.11.0) + mini_mime (1.1.2) + minitest (5.16.3) + nio4r (2.5.8) + nokogiri (1.13.8-arm64-darwin) + racc (~> 1.4) + nokogiri (1.13.8-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.13.8-x86_64-linux) + racc (~> 1.4) nori (2.6.0) orm_adapter (0.5.0) + pagy (5.10.1) + activesupport pg (0.21.0) - phony (2.16.3) - phony_rails (0.14.6) + phony (2.20.0) + phony_rails (0.15.0) activesupport (>= 3.0) - phony (> 2.15) - public_suffix (3.0.2) - puma (3.11.4) - rack (2.0.5) - rack-cors (1.0.2) + phony (>= 2.18.12) + public_suffix (5.0.0) + puma (3.12.6) + racc (1.6.0) + rack (2.2.4) + rack-cors (1.1.1) + rack (>= 2.0.0) rack-test (0.6.3) rack (>= 1.0) - rails (5.0.7) - actioncable (= 5.0.7) - actionmailer (= 5.0.7) - actionpack (= 5.0.7) - actionview (= 5.0.7) - activejob (= 5.0.7) - activemodel (= 5.0.7) - activerecord (= 5.0.7) - activesupport (= 5.0.7) + rails (5.0.7.2) + actioncable (= 5.0.7.2) + actionmailer (= 5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) + activemodel (= 5.0.7.2) + activerecord (= 5.0.7.2) + activesupport (= 5.0.7.2) bundler (>= 1.3.0) - railties (= 5.0.7) + railties (= 5.0.7.2) sprockets-rails (>= 2.0.0) - rails-controller-testing (1.0.2) - actionpack (~> 5.x, >= 5.0.1) - actionview (~> 5.x, >= 5.0.1) - activesupport (~> 5.x) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - rails-i18n (5.1.1) + rails-html-sanitizer (1.4.3) + loofah (~> 2.3) + rails-i18n (5.1.3) i18n (>= 0.7, < 2) railties (>= 5.0, < 6) - railties (5.0.7) - actionpack (= 5.0.7) - activesupport (= 5.0.7) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.3.1) - rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) rb-readline (0.5.5) - remotipart (1.4.2) - request_store (1.5.0) + rdoc (6.3.3) + remotipart (1.4.4) + request_store (1.5.1) rack (>= 1.4) - responders (2.4.0) - actionpack (>= 4.2.0, < 5.3) - railties (>= 4.2.0, < 5.3) - rgeo (1.0.0) - rgeo-activerecord (6.0.0) - activerecord (~> 5.0) - rgeo (~> 1.0) - rgeo-proj4 (1.0.0) - rgeo (~> 1.0) - rgeo-shapefile (1.0.0) - dbf (~> 3.0) - rgeo (~> 1.0) - rolify (5.2.0) - rspec-core (3.7.1) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + responders (3.0.1) + actionpack (>= 5.0) + railties (>= 5.0) + rexml (3.2.5) + rgeo (2.4.0) + rgeo-activerecord (6.2.2) + activerecord (>= 5.0) + rgeo (>= 1.0.0) + rgeo-proj4 (3.1.1) + rgeo (~> 2.0) + rgeo-shapefile (3.0.0) + dbf (~> 4.0) + rgeo (>= 1.0) + rolify (6.0.0) + rspec-core (3.9.3) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.4) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-rails (3.7.2) + rspec-support (~> 3.9.0) + rspec-rails (3.9.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.1) - ruby_parser (3.11.0) - sexp_processor (~> 4.9) - rubyzip (1.2.1) - sass (3.5.6) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.4) + ruby-vips (2.1.4) + ffi (~> 1.12) + ruby_parser (3.19.1) + sexp_processor (~> 4.16) + rubyzip (2.3.2) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -333,69 +356,72 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - savon (2.12.0) + savon (2.13.0) akami (~> 1.2) builder (>= 2.1.2) gyoku (~> 1.2) - httpi (~> 2.3) + httpi (>= 2.4.5) + mail (~> 2.5) nokogiri (>= 1.8.1) nori (~> 2.4) wasabi (~> 3.4) - sexp_processor (4.11.0) - shoulda-matchers (3.1.2) - activesupport (>= 4.0.0) - simple_form (4.0.0) - actionpack (> 4) - activemodel (> 4) - simple_token_authentication (1.15.1) - actionmailer (>= 3.2.6, < 6) - actionpack (>= 3.2.6, < 6) + sexp_processor (4.16.1) + shoulda-matchers (4.5.1) + activesupport (>= 4.2.0) + simple_form (5.0.3) + actionpack (>= 5.0) + activemodel (>= 5.0) + simple_token_authentication (1.17.0) + actionmailer (>= 3.2.6, < 7) + actionpack (>= 3.2.6, < 7) devise (>= 3.2, < 6) socksify (1.7.1) - spring (2.0.2) - activesupport (>= 4.2) + spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - ssrf_filter (1.0.7) - temple (0.8.0) - thor (0.20.0) + ssrf_filter (1.1.1) + temple (0.8.2) + thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.8) - turbolinks (5.1.1) - turbolinks-source (~> 5.1) - turbolinks-source (5.1.0) - tzinfo (1.2.5) + tilt (2.0.11) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.10) thread_safe (~> 0.1) - tzinfo-data (1.2018.5) + tzinfo-data (1.2022.3) tzinfo (>= 1.0.0) - uglifier (4.1.10) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - warden (1.2.7) - rack (>= 1.0) - wasabi (3.5.0) + warden (1.2.9) + rack (>= 2.0.9) + wasabi (3.7.0) + addressable httpi (~> 2.0) nokogiri (>= 1.4.2) - web-console (3.6.2) + web-console (3.7.0) actionview (>= 5.0) activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) + websocket-extensions (0.1.5) whenever (1.0.0) chronic (>= 0.6.3) PLATFORMS - ruby + arm64-darwin-21 + x86_64-darwin-20 + x86_64-linux DEPENDENCIES active_model_serializers (~> 0.10.0) @@ -408,7 +434,7 @@ DEPENDENCIES better_errors binding_of_caller bootstrap-datepicker-rails - bootstrap-sass (= 3.2.0.4) + bootstrap-sass (~> 3.3.6) byebug cancancan carrierwave-aws (~> 1.1) @@ -417,8 +443,9 @@ DEPENDENCIES dbf devise em-http-request - factory_bot_rails + factory_bot_rails (~> 4.11) figaro + geospatial-kml groupdate haml-rails jbuilder (~> 2.5) @@ -432,6 +459,7 @@ DEPENDENCIES lograge-sql mini_magick oneclick_refernet! + pagy (~> 5.10.1) pg (~> 0.18) phony_rails puma (~> 3.0) @@ -440,6 +468,7 @@ DEPENDENCIES rails-controller-testing rails-i18n rb-readline + rdoc (~> 6.3.0) remotipart (~> 1.3, >= 1.3.1) rgeo rgeo-proj4 @@ -463,4 +492,4 @@ DEPENDENCIES whenever BUNDLED WITH - 2.3.10 + 2.3.20 diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/javascripts/admin/autocomplete.js b/app/assets/javascripts/admin/autocomplete.js new file mode 100644 index 000000000..2758fe064 --- /dev/null +++ b/app/assets/javascripts/admin/autocomplete.js @@ -0,0 +1,99 @@ +$(document).on("turbolinks:load", () => { + // Set up a listener to detect when a user tries to delete a tag + $(".autocomplete-tag-index").on("click", ".autocomplete-tag-delete", onAutocompleteDelete); + + // Implement autocomplete behavior on the desired fields + $("input.autocomplete-field").each(makeInputAutocomplete); + + // Buttons for adding all tags to field + $(".autocomplete-add-all").click((e) => { + const selector = e.target.dataset['selector']; + const source = window[e.target.dataset['source']](); + + for (let i=0; i