Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bootstrap for reveal/collapse contact form #3379

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 1 addition & 33 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.

34 changes: 1 addition & 33 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.

1 change: 0 additions & 1 deletion app/assets/stylesheets/spotlight/_report_a_problem.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#report-problem-form {
display: none;
border-bottom: 1px solid $gray-600;

h2 {
Expand Down
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.

2 changes: 1 addition & 1 deletion app/views/shared/_masthead.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if show_contact_form? && (current_exhibit.nil? || !current_page?(spotlight.new_exhibit_contact_form_path(current_exhibit))) %>
<div id="report-problem-form">
<div id="report-problem-form" class="collapse">
<%= render 'spotlight/shared/report_a_problem' %>
</div>
<% end %>
Expand Down
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>
19 changes: 19 additions & 0 deletions package-lock.json

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

Loading