diff options
-rw-r--r-- | templates/web/base/report/new/form_report.html | 2 | ||||
-rw-r--r-- | templates/web/base/report/new/form_user.html | 2 | ||||
-rw-r--r-- | templates/web/fixmystreet.com/footer_extra_js.html | 1 | ||||
-rw-r--r-- | templates/web/oxfordshire/footer_extra_js.html | 1 | ||||
-rw-r--r-- | web/cobrands/oxfordshire/assets.js | 18 | ||||
-rw-r--r-- | web/cobrands/oxfordshire/base.scss | 5 |
6 files changed, 29 insertions, 0 deletions
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html index b4688f950..24c3ff4d1 100644 --- a/templates/web/base/report/new/form_report.html +++ b/templates/web/base/report/new/form_report.html @@ -6,6 +6,7 @@ [% PROCESS "report/new/category_wrapper.html" %] [% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %] +<div id="post_category_details_form"> [% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %] <h2 class="form-section-heading">[% loc( 'Public details' ) %]</h2> @@ -75,3 +76,4 @@ <input type="hidden" id="single_body_only" name="single_body_only" value=""> <input type="hidden" id="do_not_send" name="do_not_send" value=""> <input type="hidden" name="submit_problem" value="1"> +</div> diff --git a/templates/web/base/report/new/form_user.html b/templates/web/base/report/new/form_user.html index 68a226693..3e0af10a3 100644 --- a/templates/web/base/report/new/form_user.html +++ b/templates/web/base/report/new/form_user.html @@ -1,3 +1,4 @@ +<div id="private_form"> <h2 class="form-section-heading form-section-heading--private">[% loc('Private details') %]</h2> <p class="form-section-description" id="js-councils_text_private"> [% IF js %] @@ -13,3 +14,4 @@ [% ELSE %] [% PROCESS "report/new/form_user_loggedout.html" %] [% END %] +</div> diff --git a/templates/web/fixmystreet.com/footer_extra_js.html b/templates/web/fixmystreet.com/footer_extra_js.html index c1d1b09b0..bb7c9780c 100644 --- a/templates/web/fixmystreet.com/footer_extra_js.html +++ b/templates/web/fixmystreet.com/footer_extra_js.html @@ -9,6 +9,7 @@ IF bodyclass.match('mappage'); scripts.push( version('/cobrands/bromley/assets.js') ); scripts.push( version('/cobrands/buckinghamshire/assets.js') ); scripts.push( version('/cobrands/lincolnshire/assets.js') ); + scripts.push( version('/cobrands/oxfordshire/assets.js') ); scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), ); diff --git a/templates/web/oxfordshire/footer_extra_js.html b/templates/web/oxfordshire/footer_extra_js.html index 541e2ee16..e05e16707 100644 --- a/templates/web/oxfordshire/footer_extra_js.html +++ b/templates/web/oxfordshire/footer_extra_js.html @@ -1,4 +1,5 @@ [% scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), version('/cobrands/oxfordshire/js.js'), + version('/cobrands/oxfordshire/assets.js'), ) %] diff --git a/web/cobrands/oxfordshire/assets.js b/web/cobrands/oxfordshire/assets.js new file mode 100644 index 000000000..8858ee66e --- /dev/null +++ b/web/cobrands/oxfordshire/assets.js @@ -0,0 +1,18 @@ +(function(){ + function disable_form(disable) { + $('#post_category_details_form').toggle(!disable); + $('#private_form').toggle(!disable); + } + + function check_rights_of_way() { + if (OpenLayers.Util.indexOf(fixmystreet.bodies, 'Oxfordshire County Council') > -1 && $('#form_category').val() == 'Countryside Paths / Public Rights of Way (usually not tarmac)') { + $('#category_meta').html('<p class="category-message">Please report problems with rights of way using <a href="https://publicrightsofway.oxfordshire.gov.uk/web/standardmap.aspx">this page</a>.</p>'); + disable_form(true); + } else { + $('#category_meta').html(''); + disable_form(false); + } + } + + $(fixmystreet).on('report_new:category_change', check_rights_of_way); +})(); diff --git a/web/cobrands/oxfordshire/base.scss b/web/cobrands/oxfordshire/base.scss index aaaaa186c..6d4bad117 100644 --- a/web/cobrands/oxfordshire/base.scss +++ b/web/cobrands/oxfordshire/base.scss @@ -275,6 +275,11 @@ textarea { } } +.category-message { + padding: 1em; + background-color: $color-oxfordshire-pale-grey-green; +} + .item-list--reports__item { small { font-style: inherit; |