-
Notifications
You must be signed in to change notification settings - Fork 14
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 edit supplier declarations
This adds the ability for a CCS Sourcing team member to view and edit G-Cloud 7 supplier declarations. In the supplier listing the only link they will see alongside a supplier is 'G-Cloud 7 declaration'. This will take them to the G-Cloud 7 supplier declaration overview where they can edit each section. This uses the new ContentLoader but hard codes the G-Cloud 7 link in the supplier list as it is the only framework they can edit at the moment. Note that this does no validation, it is assumed that the CCS Sourcing team know the rules.
- Loading branch information
Showing
8 changed files
with
189 additions
and
16 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
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,3 @@ | ||
.my-special-page thead .summary-item-field-heading-first { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
width: 60%; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% import 'macros/toolkit_forms.html' as forms %} | ||
|
||
{% extends "_base_page.html" %} | ||
|
||
{% block page_title %} | ||
Change {{ framework.name }} declaration | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="page-container edit-section"> | ||
<div class="grid-row"> | ||
<div class="service-title"> | ||
{% | ||
with | ||
context = supplier.name, | ||
heading = section.name, | ||
smaller = True | ||
%} | ||
{% include "toolkit/page-heading.html" %} | ||
{% endwith %} | ||
</div> | ||
</div> | ||
|
||
<form method="post" enctype="multipart/form-data"> | ||
<div class="grid-row"> | ||
<div class="column-two-thirds"> | ||
<div style="display:none;"><input id="csrf_token" name="csrf_token" type="hidden" value="{{ csrf_token() }}"></div> | ||
{% for question in section.questions %} | ||
{{ forms[question.type](question, declaration, {}) }} | ||
{% endfor %} | ||
{% | ||
with | ||
type = "save", | ||
label = "Save and return to summary" | ||
%} | ||
{% include "toolkit/button.html" %} | ||
{% endwith %} | ||
<p> | ||
<a href="{{ url_for('.view_supplier_declaration', supplier_id=supplier.id, framework_slug=framework.slug) }}">Return without saving</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} |
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,44 @@ | ||
{% import "toolkit/summary-table.html" as summary %} | ||
|
||
{% extends "_base_page.html" %} | ||
|
||
{% block page_title %} | ||
Change {{ framework.name }} declaration | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="page-container my-special-page"> | ||
<div class="grid-row"> | ||
<div class="service-title"> | ||
{% | ||
with | ||
context = supplier.name, | ||
heading = framework.name + " declaration", | ||
smaller = True | ||
%} | ||
{% include "toolkit/page-heading.html" %} | ||
{% endwith %} | ||
</div> | ||
</div> | ||
|
||
{% for section in content %} | ||
{{ summary.heading(section.name) }} | ||
{{ summary.top_link("Edit", url_for('.edit_supplier_declaration_section', supplier_id=supplier.id, framework_slug=framework.slug, section_id=section.id)) }} | ||
{% call(item) summary.list_table( | ||
section.questions, | ||
caption="Declaration", | ||
empty_message="This supplier not made a declaration", | ||
field_headings=[ | ||
'Declaration question', | ||
'Declaration answer' | ||
] | ||
) %} | ||
{% call summary.row() %} | ||
{{ summary.field_name(item.question) }} | ||
{{ summary[item.type](declaration[item.id]) }} | ||
{% endcall %} | ||
{% endcall %} | ||
{% endfor %} | ||
</div> | ||
|
||
{% endblock %} |
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
How special is this page exactly?