Skip to content

Commit

Permalink
[Hart] Continue button should not be visible when disabled
Browse files Browse the repository at this point in the history
Reported that users think the button is broken and don't read
the message above for an explanation of why they can't proceed

Hart request
https://mysocietysupport.freshdesk.com/a/tickets/4818

Surrey request
https://mysocietysupport.freshdesk.com/a/tickets/4768
  • Loading branch information
MorayMySoc committed Dec 2, 2024
1 parent 06d2a15 commit 0f1bf22
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions web/cobrands/fixmystreet/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,9 @@ fixmystreet.message_controller = (function() {
if ( $('#js-roads-responsibility').is(':visible') || $('.js-mobile-not-an-asset').length ) {
return;
}
if (hide_continue_button()) {
$('.js-reporting-page--next').show();
}
$('.js-reporting-page--next').prop('disabled', false);
$("#mob_ok, #toggle-fullscreen").removeClass('hidden-js');
}
Expand All @@ -1546,6 +1549,16 @@ fixmystreet.message_controller = (function() {
$("#mob_ok, #toggle-fullscreen").addClass('hidden-js');
} else {
$('.js-reporting-page--next').prop('disabled', true);
if (hide_continue_button()) {
$('.js-reporting-page--next').hide();
}
}
}

function hide_continue_button() {
var cobrands_to_hide = ['hart'];
if (cobrands_to_hide.indexOf(fixmystreet.cobrand) !== -1) {
return 1;
}
}

Expand Down

0 comments on commit 0f1bf22

Please sign in to comment.