Skip to content

Commit

Permalink
remove unnecessary element post aptc update fix (#4410)
Browse files Browse the repository at this point in the history
* enable ssn toggle after aptc update

* remove inner html of aptc data instead of removing element

* uncomment out lines

* readd line
  • Loading branch information
TristanB17 authored and bbodine1 committed Aug 28, 2024
1 parent ca9d77e commit bca13ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/controllers/hbx_admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class HbxAdminController < ApplicationController
before_action :find_values, only: [:update_aptc_csr, :calculate_aptc_csr, :edit_aptc_csr]
before_action :validate_aptc, only: [:update_aptc_csr, :calculate_aptc_csr]
before_action :set_cache_headers, only: [:edit_aptc_csr]
before_action :enable_bs4_layout, only: :update_aptc_csr if EnrollRegistry.feature_enabled?(:mask_ssn_ui_fields)

def registry
authorize EnrollRegistry, :show?
Expand Down Expand Up @@ -102,4 +103,8 @@ def check_osse_eligibility
@enrollments_info[hbx.id]['osse_eligible'] = hbx.ivl_osse_eligible?
end
end

def enable_bs4_layout
@bs4 = true
end
end
11 changes: 8 additions & 3 deletions app/views/hbx_admin/update_aptc_csr.js.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//set_tab_content("update successful.");
$('#aptcData').hide();
$('#aptcUpdate').html('<%= j render partial: 'update_aptc_csr'%>');
if (<%= @bs4 %>) {
document.getElementById('aptcData').innerHTML = ''
document.getElementById('aptcUpdate').innerHTML = '<%= j render partial: 'update_aptc_csr' %>';
} else {
//set_tab_content("update successful.");
$('#aptcData').hide();
$('#aptcUpdate').html('<%= j render partial: 'update_aptc_csr'%>');
}

0 comments on commit bca13ed

Please sign in to comment.