diff --git a/app/assets/javascripts/tailwind/application.js b/app/assets/javascripts/tailwind/application.js index f2bb5fae8..8478f07dc 100644 --- a/app/assets/javascripts/tailwind/application.js +++ b/app/assets/javascripts/tailwind/application.js @@ -1 +1,2 @@ //= require tailwind/maps +//= require geolocation \ No newline at end of file diff --git a/app/views/_tailwind/applications/_address_search_form.html.erb b/app/views/_tailwind/applications/_address_search_form.html.erb index 57e307b85..498fc6a9a 100644 --- a/app/views/_tailwind/applications/_address_search_form.html.erb +++ b/app/views/_tailwind/applications/_address_search_form.html.erb @@ -11,7 +11,20 @@

<%= form.label :q, "Street address", class: "sr-only" %> <%# TODO: Re-enable autofocus:true below after finished testing with livereload %> -
+
<%= form.text_field :q, value: q, placeholder: "e.g. 1 Sowerby St, Goulburn, NSW 2580", @@ -21,13 +34,13 @@ const { Autocomplete } = await google.maps.importLibrary('places'); new Autocomplete($el, {componentRestrictions: {country: 'au'}, types: ['address']})} }", - "x-init" => "initAutocomplete()" %> - <%= button_tag type: "button", class: "text-white sm:text-xl block w-full" do %> + "x-init" => "initAutocomplete()", + "x-model.fill" => "address" %> + <%= button_tag type: "button", class: "text-white sm:text-xl block w-full", "@click": "geolocate($event)", "x-bind:disabled": "loading" do %> <%= render "application/svg/location" %> - <%# TODO: Make geolocate button work %> - or use my current location + or use my current location <% end %>