Skip to content

Commit f001ca3

Browse files
jcoynednoneill
authored andcommitted
Use bootstrap for reveal/collapse contact form
This provides better accessibility (aria-expanded) than our custom solution
1 parent 91c9c52 commit f001ca3

File tree

11 files changed

+13
-333
lines changed

11 files changed

+13
-333
lines changed

app/assets/javascripts/spotlight/application.js

-8
This file was deleted.

app/assets/javascripts/spotlight/spotlight.esm.js

-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/javascripts/spotlight/spotlight.esm.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/javascripts/spotlight/spotlight.js

-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/javascripts/spotlight/spotlight.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/stylesheets/spotlight/_report_a_problem.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#report-problem-form {
2-
display: none;
32
border-bottom: 1px solid $gray-600;
43

54
h2 {
-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import BrowseGroupCateogries from 'spotlight/user/browse_group_categories'
22
import Carousel from 'spotlight/user/carousel'
33
import ClearFormButton from 'spotlight/user/clear_form_button'
4-
import ReportProblem from 'spotlight/user/report_a_problem'
54
import ZprLinks from 'spotlight/user/zpr_links'
65

76
export default class {
87
connect() {
98
new BrowseGroupCateogries().connect()
109
new Carousel().connect()
1110
new ClearFormButton().connect()
12-
new ReportProblem().connect()
1311
new ZprLinks().connect()
1412
}
1513
}

app/javascript/spotlight/user/report_a_problem.js

-30
This file was deleted.

app/views/shared/_masthead.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% if show_contact_form? && (current_exhibit.nil? || !current_page?(spotlight.new_exhibit_contact_form_path(current_exhibit))) %>
2-
<div id="report-problem-form">
2+
<div id="report-problem-form" class="collapse">
33
<%= render 'spotlight/shared/report_a_problem' %>
44
</div>
55
<% end %>

app/views/shared/_user_util_links.html.erb

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
<% end %>
4848
<% if current_exhibit and show_contact_form? %>
4949
<li class="nav-item">
50-
<%= 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' %>
50+
<%= link_to t('spotlight.header_links.contact'), spotlight.new_exhibit_contact_form_path(current_exhibit),
51+
data: { bs_toggle: 'collapse', bs_target: '#report-problem-form' },
52+
class: 'nav-link' %>
5153
</li>
5254
<% end %>
5355
</ul>

0 commit comments

Comments
 (0)