Skip to content

Commit

Permalink
Move modal-footer section outside of modal-body
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed Dec 13, 2024
1 parent cd5ca8a commit d29c96a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 45 deletions.
32 changes: 16 additions & 16 deletions app/views/catalog/_ask_a_question_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="modal-body">
<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
remote: true,
url: contact_question_path,
data: { blacklight_modal: 'trigger' },
html: {class: "modal_form"}
) do |f|
%>
<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
remote: true,
url: contact_question_path,
data: { blacklight_modal: 'trigger' },
html: {class: "modal_form"}
) do |f|
%>
<div class="modal-body">
<%= f.label :name %><br>
<%= f.input_field :name %><br>
<%= f.label :email %><br>
Expand All @@ -17,9 +17,9 @@
<%= f.input :context, as: :hidden %>
<%= f.input :title, as: :hidden %>
<%= f.input :feedback_desc, as: :hidden %>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", data: {bs_dismiss: "modal"}, id: 'submit-question' %>
</div>
<% end %>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", data: {bs_dismiss: "modal"}, id: 'submit-question' %>
</div>
<% end %>
27 changes: 13 additions & 14 deletions app/views/catalog/_report_harmful_language_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<div class="modal-body">
<%= render :partial=>'shared/flash_msg' %>
<div>
<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
remote: true,
url: contact_report_harmful_language_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>
<div class="modal-body">
<p>Princeton University Library aims to describe materials in a manner that is respectful to all individuals and communities. However, for a variety of reasons, users may encounter offensive or harmful language—for example, language that is racist, sexist, or homophobic—in our catalog.</p>

<p>Staff are currently implementing practices to address offensive or harmful language, particularly in subject headings. We recognize that terminology evolves over time and that efforts to create respectful and inclusive descriptions and subject headings must be ongoing. You can help us address this issue by reporting any <a href="https://library.princeton.edu/about/languagestatement">harmful or offensive language</a> you encounter on this site by using the form below. If you would prefer to report anonymously, you may leave the name and email fields blank.</p>
</div>
<%= simple_form_for(
form,
remote: true,
url: contact_report_harmful_language_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>

<%= f.label :message %><br>
<%= f.input_field :message, as: :text, style: "width: 100%" %><br>
<%= f.label :name, style: "width: 100%", label: 'Name (optional)' %><br>
Expand All @@ -34,9 +33,9 @@
<%= f.input_field :title, hidden: true %><br>
<%= f.input_field :context, hidden: true %><br>
<%= f.input :feedback_desc, as: :hidden %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", data: {bs_dismiss: "modal"}, id: 'submit-question' %>
</div>
<% end %>
</div>
<% end %>
32 changes: 17 additions & 15 deletions app/views/catalog/_suggest_correction_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<div class="modal-body">
<%= render :partial=>'shared/flash_msg' %>
<p>Please use this area to report errors or omissions that appear in the description of this record.</p>
<%= simple_form_for(
form,
remote: true,
url: contact_suggestion_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>

<%= render :partial=>'shared/flash_msg' %>
<%= simple_form_for(
form,
remote: true,
url: contact_suggestion_path,
data: { blacklight_modal: 'trigger' },
html: { class: "modal_form" }
) do |f|
%>
<div class="modal-body">
<p>Please use this area to report errors or omissions that appear in the description of this record.</p>
<%= f.label :name %><br>
<%= f.input_field :name %><br>
<%= f.label :email %><br>
Expand All @@ -18,9 +19,10 @@
<%= f.input :context, as: :hidden %>
<%= f.input :title, as: :hidden %>
<%= f.input :feedback_desc, as: :hidden %>
<div class="modal-footer">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<%= f.submit "Send", class: "btn btn-primary", data: {bs_dismiss: "modal"}, id: 'submit-suggestion' %>
</div>
<% end %>
</div>
</div>
<% end %>

0 comments on commit d29c96a

Please sign in to comment.