diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/staff.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/web/cobrands/fixmystreet/staff.js b/web/cobrands/fixmystreet/staff.js index f1e07ed6b..2b7c5b010 100644 --- a/web/cobrands/fixmystreet/staff.js +++ b/web/cobrands/fixmystreet/staff.js @@ -330,16 +330,11 @@ $.extend(fixmystreet.set_up, { }); } - // Make the "Provide an update" form toggleable, and hide it by default. + // Make the "Provide an update" form toggleable, hidden by default. // (Inspectors will normally just use the #public_update box instead). - var $updateFormH2 = $('.update-form-heading'); - var $updateFormBtn = $('<button>').insertBefore( $updateFormH2 ); - $updateFormH2.hide().nextAll().hide(); - $updateFormBtn.addClass('btn btn--provide-update'); - $updateFormBtn.text( $updateFormH2.text() ); - $updateFormBtn.on('click', function(e) { + $('.js-provide-update').on('click', function(e) { e.preventDefault(); - $updateFormH2.nextAll().toggle(); + $(this).next().toggleClass('hidden-js'); }); }, |