Skip to content

Commit

Permalink
Use bootstrap for reveal/collapse contact form
Browse files Browse the repository at this point in the history
This provides better accessibility (aria-expanded) than our custom solution
  • Loading branch information
jcoyne committed Dec 20, 2024
1 parent a820963 commit 6bd6d12
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 99 deletions.
32 changes: 0 additions & 32 deletions app/assets/javascripts/spotlight/spotlight.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/javascripts/spotlight/spotlight.esm.js.map

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions app/assets/javascripts/spotlight/spotlight.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/javascripts/spotlight/spotlight.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions app/javascript/spotlight/user/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import BrowseGroupCateogries from 'spotlight/user/browse_group_categories'
import Carousel from 'spotlight/user/carousel'
import ClearFormButton from 'spotlight/user/clear_form_button'
import ReportProblem from 'spotlight/user/report_a_problem'
import ZprLinks from 'spotlight/user/zpr_links'

export default class {
connect() {
new BrowseGroupCateogries().connect()
new Carousel().connect()
new ClearFormButton().connect()
new ReportProblem().connect()
new ZprLinks().connect()
}
}
30 changes: 0 additions & 30 deletions app/javascript/spotlight/user/report_a_problem.js

This file was deleted.

4 changes: 3 additions & 1 deletion app/views/shared/_user_util_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
<% end %>
<% if current_exhibit and show_contact_form? %>
<li class="nav-item">
<%= link_to t('spotlight.header_links.contact'), spotlight.new_exhibit_contact_form_path(current_exhibit), data: {behavior: 'contact-link', target: 'report-problem-form' }, class: 'nav-link' %>
<%= link_to t('spotlight.header_links.contact'), spotlight.new_exhibit_contact_form_path(current_exhibit),
data: { bs_toggle: 'collapse', bs_target: 'report-problem-form' },
class: 'nav-link' %>
</li>
<% end %>
</ul>

0 comments on commit 6bd6d12

Please sign in to comment.