Skip to content

Commit

Permalink
188658143 plan shopping compare plan (#4835)
Browse files Browse the repository at this point in the history
* replace radiohandler with listener

* removal of onkeydown handlers

---------

Co-authored-by: Ryan Eddy <[email protected]>
  • Loading branch information
2 people authored and bbodine1 committed Dec 18, 2024
1 parent 39e6fd6 commit 606987d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
<legend class="required"><%= l10n("insured.group_selection.is_tobacco_user") %></legend>
<% member = @latest_enrollment.hbx_enrollment_members.where(applicant_id: family_member.id).first if @latest_enrollment %>
<div class="n-radio-group d-flex align-items-center mt-2 mb-2">
<div tabindex="0" onkeydown="handleRadioKeyDown(event, 'is_tobacco_user_Y_<%= index %>')" class="n-radio-row mr-3">
<div tabindex="0" class="n-radio-row mr-3" data-keydown-id="is_tobacco_user_Y_<%= index %>">
<label data-cuke="is_tobacco_user_Y_<%= index %>" class="n-radio radio-label weight-n" for="is_tobacco_user_Y_<%= index %>">
<input id="is_tobacco_user_Y_<%= index %>" type="radio" value="Y" name="is_tobacco_user_<%= family_member.id %>" <%='checked' if member&.tobacco_use == 'Y' %>>
<%= l10n('yes') %>
</label>
</div>
<div tabindex="0" onkeydown="handleRadioKeyDown(event, 'is_tobacco_user_N_<%= index %>')" class="n-radio-row mr-3">
<div tabindex="0" class="n-radio-row mr-3" data-keydown-id="is_tobacco_user_N_<%= index %>">
<label data-cuke="is_tobacco_user_N_<%= index %>" class="n-radio radio-label weight-n" for="is_tobacco_user_N_<%= index %>">
<input id="is_tobacco_user_N_<%= index %>" type="radio" value="N" name="is_tobacco_user_<%= family_member.id %>" <%='checked' if member&.tobacco_use != 'Y' %>>
<%= l10n('no') %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/insured/group_selection/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="n-radio-group d-flex align-items-center mb-2">
<% view_market_places(@person).each_with_index do |kind, index| %>
<label class="n-radio weight-n" for="market_kind_<%= kind %>">
<div tabindex="0" onkeydown="handleButtonKeyDown(event, 'market_kind_<%= kind %>')">
<div tabindex="0" data-keydown-id="market_kind_<%= kind %>">
<%= radio_button_tag 'market_kind', kind, index == 0, id: "market_kind_#{kind}", required: true, class: "n-radio", checked: is_market_kind_checked?(kind, @person), disabled: is_market_kind_disabled?(kind, @person) %>
<% if kind=="individual" %>
<%= l10n("insured.group_selection.new.individual_benefits") %>
Expand Down Expand Up @@ -99,14 +99,14 @@
<legend class="text-reset mb-0"><h3><%= l10n("benefit_type") %></h3></legend>

<div class="n-radio-group d-flex align-items-center mb-2">
<div tabindex="0" onkeydown="handleButtonKeyDown(event, 'coverage_kind_health')" class="n-radio-row mr-3">
<div tabindex="0" data-keydown-id="coverage_kind_health" class="n-radio-row mr-3">
<label class="n-radio weight-n" for="coverage_kind_health">
<%= radio_button_tag 'coverage_kind', 'health', is_coverage_kind_checked?("health"), disabled: is_coverage_kind_disabled?("health"), id: 'coverage_kind_health', required: true, class: "n-radio" %>
<%= l10n("health") %>
</label>
</div>

<div tabindex="0" onkeydown="handleButtonKeyDown(event, 'coverage_kind_dental')" id="dental-radio-button" class=" mr-3 n-radio-row <%= 'dn' if @adapter.can_shop_shop?(@person) && !@adapter.is_eligible_for_dental?(@employee_role, @change_plan, @hbx_enrollment, effective_date_for_display) %>">
<div tabindex="0" data-keydown-id="coverage_kind_dental" id="dental-radio-button" class=" mr-3 n-radio-row <%= 'dn' if @adapter.can_shop_shop?(@person) && !@adapter.is_eligible_for_dental?(@employee_role, @change_plan, @hbx_enrollment, effective_date_for_display) %>">
<label class="n-radio weight-n" for="coverage_kind_dental">
<%= radio_button_tag 'coverage_kind', 'dental', is_coverage_kind_checked?("dental"), disabled: is_coverage_kind_disabled?("dental"), id: 'coverage_kind_dental', required: true, class: 'n-radio' %>
<%= l10n("dental") %>
Expand Down

0 comments on commit 606987d

Please sign in to comment.