diff options
author | Struan Donald <struan@exo.org.uk> | 2018-09-12 12:26:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-03 11:23:56 +0100 |
commit | d2939e236f7bb04ec7dd3902e69134e1b538a6fb (patch) | |
tree | c0988b55ce7d21a17c2cca772e342d4d12abca17 /web | |
parent | ed4b5d488dfed411be0ba03e7cd1e0c5998f0de7 (diff) |
[Oxfordshire] display message if user selects PROW category
Adds some div wrappers round the non category bit of the form so we can
then hide easily.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/oxfordshire/assets.js | 18 | ||||
-rw-r--r-- | web/cobrands/oxfordshire/base.scss | 5 |
2 files changed, 23 insertions, 0 deletions
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; |