Skip to content

Commit

Permalink
don't initially disable the continue button
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinmerbach authored and bbodine1 committed Aug 14, 2024
1 parent 633ee62 commit b7121c4
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions app/views/insured/plan_shoppings/choose_shopping_method.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
</fieldset>
<!-- logic for the next link: if yes, it should show appropriate modal, if no, go to plan shopping -->
<% content_for :submit_button do %>
<%= link_to(l10n("continue_next"), insured_plan_shopping_path(:id => @hbx_enrollment.id, market_kind: @market_kind, coverage_kind: @hbx_enrollment.coverage_kind, enrollment_kind: @hbx_enrollment.enrollment_kind), class: "button disabled hidden", id: "plan-shopping-link") %>
<%= link_to(l10n("continue_next"), insured_plan_shopping_path(:id => @hbx_enrollment.id, market_kind: @market_kind, coverage_kind: @hbx_enrollment.coverage_kind, enrollment_kind: @hbx_enrollment.enrollment_kind), class: "button hidden", id: "plan-shopping-link") %>
<% if @market_kind == "individual" && @coverage_kind == "health" %>
<%= h(link_to l10n("continue_next"), "", data: {toggle: "modal", target: "#plan_match_redirection"}, class: "button disabled", disabled: true, id: "checkbook-link") %>
<%= h(link_to l10n("continue_next"), "", data: {toggle: "modal", target: "#plan_match_redirection"}, class: "button", id: "checkbook-link") %>
<% end %>
<% if @market_kind == "individual" && @coverage_kind == "dental" %>
<%= h(link_to l10n("continue_next"), '',data: {toggle: "modal", target: "#plan_match_dental_redirection"}, class: "button disabled", disabled: true, id: "checkbook-link") %>
<%= h(link_to l10n("continue_next"), '',data: {toggle: "modal", target: "#plan_match_dental_redirection"}, class: "button", id: "checkbook-link") %>
<% end %>
<% end %>
<div class="my-4">
<%= render partial: "shared/progress_navigation_buttons", locals: {disable_link: true} %>
<%= render partial: "shared/progress_navigation_buttons", locals: {disable_link: false} %>
</div>
<!-- the modals -->
<div id="plan_match_redirection" class="modal fade" role="document" tabindex="-1">
Expand Down Expand Up @@ -78,15 +78,11 @@
<script>
$(document).on('change', 'input[name="guidance"]', function(){
if($(this).val() == "false"){
$('#plan-shopping-link').removeClass('hidden disabled');
$('#plan-shopping-link').removeAttr('disabled');
$('#checkbook-link').addClass('hidden disabled');
$('#checkbook-link').attr('disabled', true);
$('#plan-shopping-link').removeClass('hidden');
$('#checkbook-link').addClass('hidden');
} else {
$('#checkbook-link').removeClass('hidden disabled');
$('#plan-shopping-link').addClass('hidden disabled');
$('#checkbook-link').removeAttr('disabled');
$('#plan-shopping-link').attr('disabled', true);
$('#checkbook-link').removeClass('hidden');
$('#plan-shopping-link').addClass('hidden');
}
});
</script>

0 comments on commit b7121c4

Please sign in to comment.