-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to archive suitability records
This makes it possible to archive (and unarchive) a suitability record having implemented the design.
- Loading branch information
1 parent
854df6e
commit a67c846
Showing
8 changed files
with
113 additions
and
8 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
16 changes: 16 additions & 0 deletions
16
app/views/assessor_interface/suitability_records/archive.html.erb
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,16 @@ | ||
<% title = "Archive suitability record for #{@suitability_record.name}" %> | ||
|
||
<% content_for :page_title, title %> | ||
<% content_for :back_link_url, assessor_interface_suitability_records_path %> | ||
|
||
<%= form_with model: @form, url: [:assessor_interface, @suitability_record], method: :delete do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<h1 class="govuk-heading-l"><%= title %></h1> | ||
|
||
<%= f.govuk_text_area :note %> | ||
|
||
<%= f.govuk_submit "Archive record" do %> | ||
<%= govuk_link_to "Cancel", %i[assessor_interface suitability_records] %> | ||
<% 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
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
15 changes: 15 additions & 0 deletions
15
spec/support/autoload/page_objects/assessor_interface/archive_suitability_record.rb
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,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module PageObjects | ||
module AssessorInterface | ||
class ArchiveSuitabilityRecord < SitePrism::Page | ||
set_url "/assessor/suitability-records/{id}/archive" | ||
|
||
section :form, "form" do | ||
element :note_field, | ||
"#assessor-interface-archive-suitability-record-form-note-field" | ||
element :submit_button, ".govuk-button:not(.govuk-button--secondary)" | ||
end | ||
end | ||
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
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