-
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.
Merge pull request #135 from alphagov/edit-supplier-declaration
Edit supplier declaration
- Loading branch information
Showing
16 changed files
with
413 additions
and
49 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 @@ | ||
.declaration-summary thead .summary-item-field-heading-first { | ||
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
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 declaration-summary"> | ||
<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
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,17 @@ | ||
{ | ||
"declaration": { | ||
"PR1": true, | ||
"PR2": false, | ||
"SQC2": true, | ||
"PR5": false, | ||
"PR3": true, | ||
"PR4": false, | ||
"SQ1-3": [], | ||
"SQA2": false, | ||
"SQA3": true, | ||
"SQA4": false, | ||
"SQA5": true, | ||
"AQA3": false, | ||
"SQC3": ["race", "sexual orientation"] | ||
} | ||
} |
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,6 @@ | ||
{ | ||
"frameworks": { | ||
"slug": "g-cloud-7", | ||
"name": "G-Cloud 7" | ||
} | ||
} |
Oops, something went wrong.