Skip to content

Commit

Permalink
Merge pull request #2317 from MushroomObserver/fix-tooltip-display
Browse files Browse the repository at this point in the history
Form-exif geolocation opener - also check box
  • Loading branch information
nimmolo authored Aug 19, 2024
2 parents 78d2abf + 9000533 commit 2c8489c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/javascript/controllers/form-exif_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const internalConfig = {
// (formerly "observation_images" section of the form)
// Connects to data-controller="form-exif"
export default class extends Controller {
static targets = ["carousel", "item", "useExifBtn", "collapseFields"]
static targets = ["carousel", "item", "useExifBtn",
"collapseFields", "collapseCheck"]
static outlets = ["autocompleter", "map"]

connect() {
Expand Down Expand Up @@ -200,6 +201,7 @@ export default class extends Controller {
showFields() {
if (this.hasCollapseFieldsTarget) {
$(this.collapseFieldsTarget).collapse('show');
this.collapseCheckTarget.checked = true
}
}

Expand Down
3 changes: 2 additions & 1 deletion app/views/controllers/observations/form/_details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ t_s = {
form: f, field: :has_geolocation, # field is ignored
label: "#{:GEOLOCATION.l}:",
help: :form_observations_lat_long_help.t,
data: { toggle: "collapse", target: "#observation_geolocation" },
data: { toggle: "collapse", target: "#observation_geolocation",
form_exif_target: "collapseCheck" },
aria: { controls: "observation_geolocation",
expanded: @observation.lat }
) %>
Expand Down

0 comments on commit 2c8489c

Please sign in to comment.