-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add confirm discard page as an extra step when discarding a draft (un…
…published) manual Replace the existing system alert popup with a separate page to provide a better user experience.
- Loading branch information
1 parent
4c962e3
commit daa5f67
Showing
7 changed files
with
93 additions
and
7 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
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,39 @@ | ||
<% content_for :title, "Discard #{manual.title}" %> | ||
|
||
<% content_for :title_margin_bottom, 6 %> | ||
|
||
<%= render "govuk_publishing_components/components/breadcrumbs", { | ||
collapse_on_mobile: true, | ||
breadcrumbs: [ | ||
{ | ||
title: "Your manuals", | ||
url: manuals_path | ||
}, | ||
{ | ||
title: manual.title, | ||
url: manual_path(manual) | ||
}, | ||
{ | ||
title: "Discard" | ||
}, | ||
] | ||
} %> | ||
|
||
<%= render "govuk_publishing_components/components/title", { | ||
title: "Discard #{manual.title}" | ||
} %> | ||
|
||
<p class="govuk-body">You are about to discard "<%= manual.title %>".</p> | ||
<p class="govuk-body">Are you sure you want to discard this draft manual?</p> | ||
|
||
<%= form_tag(discard_draft_manual_path(manual), method: :delete) do %> | ||
<div class="govuk-button-group govuk-!-margin-bottom-6"> | ||
<%= render "govuk_publishing_components/components/button", { | ||
text: "Discard manual", | ||
name: "submit", | ||
destructive: true | ||
} %> | ||
|
||
<%= link_to("Cancel", manual_path(manual), class: "govuk-link govuk-link--no-visited-state") %> | ||
</div> | ||
<% 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
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
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
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
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