|
4 | 4 | <script src="/vendor/mapit.mysociety.org/reqwest.min.c949fe855720.js"></script> |
5 | 5 | <script src="/vendor/mapit.mysociety.org/leaflet.f1cc0a70c78b.js"></script> |
6 | 6 |
|
7 | | -<div id="parish-map" style="float:right;height:300px;width:300px;"></div> |
| 7 | +<style> |
| 8 | +.parish-category-list ul { margin-bottom: 0; } |
| 9 | +#form-categories-row > div:first-child:last-child .rm_element { display: none; } |
| 10 | +</style> |
| 11 | + |
| 12 | +<form method="post" style="display:inline"> |
| 13 | + <input type="hidden" name="saved_data" value="[% form.fif.saved_data %]"> |
| 14 | + <input type="hidden" name="goto" value="intro"> |
| 15 | + <input type="submit" class="fake-link govuk-!-margin-bottom-0" value="← Change your previous answers"> |
| 16 | +</form> |
| 17 | + |
| 18 | +<nav aria-label="Form progress bar"> |
| 19 | + <ol class="progress-form is--aligned-left"> |
| 20 | + <li class="progress-form__step is-complete"> |
| 21 | + <div class="progress-form__circle" aria-hidden="true"></div> |
| 22 | + <div class="progress-form__label">Your details</div> |
| 23 | + </li> |
| 24 | + |
| 25 | + <li class="progress-form__step is-active" aria-current="step"> |
| 26 | + <div class="progress-form__circle" aria-hidden="true"></div> |
| 27 | + <div class="progress-form__label">Select categories</div> |
| 28 | + </li> |
| 29 | + |
| 30 | + <li class="progress-form__step"> |
| 31 | + <div class="progress-form__circle" aria-hidden="true"></div> |
| 32 | + <div class="progress-form__label">Review your answers</div> |
| 33 | + </li> |
| 34 | + |
| 35 | + <li class="progress-form__step"> |
| 36 | + <div class="progress-form__circle" aria-hidden="true"></div> |
| 37 | + <div class="progress-form__label">Payment</div> |
| 38 | + </li> |
| 39 | + </ol> |
| 40 | +</nav> |
| 41 | + |
| 42 | +<section class="parish-location-section govuk-!-margin-top-6 govuk-!-margin-bottom-6"> |
| 43 | + <div> |
| 44 | + <h2 class="govuk-heading-m">Check your location is the right one</h2> |
| 45 | + <h3 class="govuk-heading-s">Currently looking at [% label_for_field(form, 'parish', form.saved_data.parish) %]</h3> |
| 46 | + |
| 47 | + <p> |
| 48 | + We’ve included a map of boundary here, to confirm we’ve found the right one. |
| 49 | + </p> |
| 50 | + |
| 51 | + <p class="govuk-!-margin-bottom-0">If you need to adjust your location please come back to the previous step to select a new location.</p> |
| 52 | + </div> |
| 53 | + |
| 54 | + <div id="parish-map"></div> |
| 55 | +</section> |
| 56 | + |
| 57 | +<section> |
| 58 | + <h2 class="govuk-heading-m">Add categories</h2> |
| 59 | + <p> |
| 60 | + The next step is to pick what things you would like to receive reports about. |
| 61 | + </p> |
| 62 | + |
| 63 | + <p> |
| 64 | + Perhaps you are responsible for all grass cutting within your area, in which case you could have a “Grass cutting” category. |
| 65 | + Or perhaps you look after a particular playing field, so a “Lifford Lane playing field” category could work for that. |
| 66 | + |
| 67 | + <p>We understand each parish/town council is different, and you have the freedom |
| 68 | + to pick what categories work for you. Please add the categories you would like below:</p> |
| 69 | + |
| 70 | + <form method="post" enctype="multipart/form-data"> |
| 71 | + [% PROCESS form %] |
| 72 | + </form> |
| 73 | +</section> |
| 74 | + |
| 75 | +<section class="help-section"> |
| 76 | + <h3 class="govuk-heading-m has-inline-svg has-inline-svg--left-align">[% INCLUDE 'icons/information.html' width='1.5em' height='1.5em' %] Need help?</h3> |
| 77 | + [% IF category_groups.size %] |
| 78 | + |
| 79 | + <h4 class="govuk-heading-s govuk-!-margin-bottom-2">Check the categories used by hight-tier councils in you area</h4> |
| 80 | + <p>The list below list all the categories currently selected by councils in your area, so you can see how |
| 81 | + your categories could fit in alongside them.</p> |
| 82 | + |
| 83 | + <ul class='parish-category-list'> |
| 84 | + [%~ FOREACH group IN category_groups ~%] |
| 85 | + [% IF group.name %] |
| 86 | + <li>[% group.name %] |
| 87 | + <ul> |
| 88 | + [% END %] |
| 89 | + [%~ FOREACH cat IN group.categories ~%] |
| 90 | + [% NEXT IF cat.category_display == '-- Pick a category --' %] |
| 91 | + <li>[% cat.category_display %] |
| 92 | + [%~ END ~%] |
| 93 | + [% IF group.name %]</ul>[% END %] |
| 94 | + [% END %] |
| 95 | + </ul> |
| 96 | + [% END %] |
| 97 | + |
| 98 | + <h4 class="govuk-heading-s govuk-!-margin-bottom-2">Do you have devolved responsibilities?</h4> |
| 99 | + <div class="two-col-desktop"> |
| 100 | + <p> |
| 101 | + Let’s say you look after all the road signs, but there already is a road signs category - then you can have a |
| 102 | + category of the same name, and within your boundary you will take precedence and receive reports in that category. |
| 103 | + </p> |
| 104 | + |
| 105 | + <p> |
| 106 | + If you are only responsible for some of the street lights, choose a category name that would make it clearer to the user which category they should pick. For example, "Road signs on the estate roads". See some examples: |
| 107 | + </p> |
| 108 | + |
| 109 | + <ul> |
| 110 | + <li><strong>Bridgwater Town Council</strong> in Somerset is responsible for a wide array of things within their area – their categories include Dog fouling, Flytipping, Graffiti, Grass cutting, Litter/dog bins, Parks, Street lighting in parks, Trees in parks (not roads), and Weed growth. |
| 111 | + <li><strong>Adstock Parish Council</strong> in Buckinghamshire is responsible for Flyposting, Grass cutting, Hedge problem, Dirty signs and Unauthorised signs. |
| 112 | + </ul> |
| 113 | + </div> |
| 114 | +</section> |
| 115 | + |
8 | 116 | <script nonce="[% csp_nonce %]"> |
9 | 117 | var map = new L.Map("parish-map"); |
10 | 118 | map.attributionControl.setPrefix(''); |
|
29 | 137 | }); |
30 | 138 | </script> |
31 | 139 |
|
32 | | -<style> |
33 | | -.hfh-repinst div { display: inline-block; } |
34 | | -.hfh-repinst .btn { vertical-align: baseline; } |
35 | | -.parish-category-list ul { margin-bottom: 0; } |
36 | | -#form-categories-row > div:first-child:last-child .rm_element { display: none; } |
37 | | -</style> |
| 140 | +<script> |
| 141 | + // Temporary fix to add govuk styling to the remove and add category. Most likely will need to be deleted. Also it doesn't work when adding new categories for the remove button. |
| 142 | + // Remember to also get rid of section dedicated for GOVUK button styling at the end of _base.scss and _layout.scss |
| 143 | + document.addEventListener('DOMContentLoaded', function() { |
| 144 | + var addBtn = document.querySelector('.add_element'); |
| 145 | + if (addBtn) { |
| 146 | + addBtn.classList.remove('btn'); |
| 147 | + addBtn.classList.add('govuk-button', 'govuk-button--secondary'); |
| 148 | + } |
38 | 149 |
|
39 | | -<h2>[% label_for_field(form, 'parish', form.saved_data.parish) %]</h2> |
40 | | - |
41 | | -<p> |
42 | | -Thanks! We've included a map of your boundary here, to confirm we've found the right one. |
43 | | -</p> |
44 | | - |
45 | | -<p> |
46 | | -The next step is to pick what things you would like to receive reports about. |
47 | | -</p> |
48 | | - |
49 | | -<p> |
50 | | -Perhaps you are responsible for all grass cutting within your area, in which case you could have a "Grass cutting" category. |
51 | | -Or perhaps you look after a particular playing field, so a "Lifford Lane playing field" category could work for that. |
52 | | - |
53 | | -[% IF category_groups.size %] |
54 | | -<p>To help, below we list the existing higher-tier council categories currently covering your area, so you can see how |
55 | | -your categories could fit in alongside them: |
56 | | -</p> |
57 | | - |
58 | | -<ul class='parish-category-list'> |
59 | | - [%~ FOREACH group IN category_groups ~%] |
60 | | - [% IF group.name %] |
61 | | - <li>[% group.name %] |
62 | | - <ul> |
63 | | - [% END %] |
64 | | - [%~ FOREACH cat IN group.categories ~%] |
65 | | - [% NEXT IF cat.category_display == '-- Pick a category --' %] |
66 | | - <li>[% cat.category_display %] |
67 | | - [%~ END ~%] |
68 | | - [% IF group.name %]</ul>[% END %] |
69 | | - [% END %] |
70 | | -</ul> |
71 | | -[% END %] |
72 | | - |
73 | | -<p> |
74 | | -If you have devolved responsibility for something in your area - say you look after |
75 | | -all the road signs, but there already is a road signs category - then you can have a |
76 | | -category of the same name, and within your boundary you will take precedence |
77 | | -and receive reports in that category. |
78 | | -</p> |
79 | | - |
80 | | -<p>If you are only responsible for some of the street lights, choose a category name |
81 | | -that would make it clearer to the user which category they should pick. For example, |
82 | | -"Road signs on the estate roads". |
83 | | - |
84 | | -<p> |
85 | | -As a couple of examples:</p> |
86 | | - |
87 | | -<ul> |
88 | | - <li><strong>Bridgwater Town Council</strong> in Somerset is responsible for a wide array of things within their area – their categories include Dog fouling, Flytipping, Graffiti, Grass cutting, Litter/dog bins, Parks, Street lighting in parks, Trees in parks (not roads), and Weed growth. |
89 | | - <li><strong>Adstock Parish Council</strong> in Buckinghamshire is responsible for Flyposting, Grass cutting, Hedge problem, Dirty signs and Unauthorised signs. |
90 | | -</ul> |
91 | | - |
92 | | -<p>We understand each parish/town council is different, and you have the freedom |
93 | | -to pick what categories work for you. Please add the categories you would like below:</p> |
| 150 | + var rmBtns = document.querySelectorAll('.rm_element'); |
| 151 | + rmBtns.forEach(function(btn) { |
| 152 | + btn.classList.remove('btn'); |
| 153 | + btn.classList.add('govuk-button', 'govuk-button--secondary', 'govuk-button--warning'); |
| 154 | + }); |
| 155 | + }); |
| 156 | +</script> |
0 commit comments