Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dismiss modal on successful email / SMS form submission
Co-authored-by: Nikitas Tampakis <nikitas.tampakis@gmail.com>
- Loading branch information
1 parent
7720668
commit 23371bd
Showing
4 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
<div class="modal-header"> | ||
<h1><%= t('blacklight.email.form.title') %></h1> | ||
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div data-blacklight-modal="container"> | ||
<div class="modal-header"> | ||
<h1><%= t('blacklight.email.form.title') %></h1> | ||
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<%= render partial: '/shared/flash_msg' %> | ||
<span data-blacklight-modal="close"></span> | ||
<div class="modal-body"> | ||
<%= render partial: '/shared/flash_msg' %> | ||
<span data-blacklight-modal="close"></span> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
<div class="modal-header"> | ||
<h1 class="modal-title"><%= t('blacklight.sms.form.title') %></h1> | ||
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div data-blacklight-modal="container"> | ||
<div class="modal-header"> | ||
<h1 class="modal-title"><%= t('blacklight.sms.form.title') %></h1> | ||
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<%= render partial: '/shared/flash_msg' %> | ||
<span data-blacklight-modal="close"></span> | ||
<div class="modal-body"> | ||
<%= render partial: '/shared/flash_msg' %> | ||
<span data-blacklight-modal="close"></span> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe "catalog/email_success.html.erb" do | ||
|
||
it "includes the data-blacklight-modal properties" do | ||
render | ||
expect(rendered).to have_selector "div[data-blacklight-modal=container]" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe "catalog/sms_success.html.erb" do | ||
|
||
it "includes the data-blacklight-modal properties" do | ||
render | ||
expect(rendered).to have_selector "div[data-blacklight-modal=container]" | ||
end | ||
end |