diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 19 | ||||
-rw-r--r-- | web/cobrands/sass/_base.scss | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 8d45e4017..2443b333d 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -426,6 +426,25 @@ $.extend(fixmystreet.set_up, { $('.js-contribute-as').change(); }, + inspect_with_public_update: function() { + $('.js-toggle-public-update').each(function() { + var $checkbox = $(this); + var toggle_public_update = function() { + if ($checkbox.prop('checked')) { + $('#public_update').parents('p').show(); + } else { + $('#public_update').parents('p').hide(); + } + }; + + $checkbox.on('change', function() { + toggle_public_update(); + }); + + toggle_public_update(); + }); + }, + on_resize: function() { var last_type; $(window).on('resize', function() { diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index 98f578fa2..08384f7c2 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -398,6 +398,17 @@ select.form-control { margin:1em 0; } +.label-containing-checkbox { + padding-#{$left}: 24px; + position: relative; + + input { + position: absolute; + #{$left}: 0; + top: 0.2em; + } +} + // form errors div.form-error, |