Skip to content

Commit

Permalink
remove of onclick events (#4862)
Browse files Browse the repository at this point in the history
* remove of onclick events

* removing jsvoid and adding event

---------

Co-authored-by: Brad Bodine <[email protected]>
  • Loading branch information
anncaballeroo and bbodine1 committed Jan 9, 2025
1 parent b74b73f commit 54f1f41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions app/assets/javascripts/inline_replacements.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ $(document).on('click', '#priorSepModal .btn-confirmation', function() {
return false;
});

$(document).on('click', '.broker-staff-registration-container button.search', function() {
// components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_new_staff_applicant.html.erb
brokerSearch();
return false
});

$(document).on('click', '.select-broker-agency', function(event) {
event.preventDefault();
selectBrokereAgency(this);
});
// components/benefit_sponsors/app/views/benefit_sponsors/profiles/broker_agencies/broker_agency_staff_roles/_search_broker_agency.html.erb:

function init_dependent_address_fields() {
// app/views/shared/_address_fields_for_dependent.html.erb
$(document).ready(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<%= f.hidden_field :is_broker_registration_page, value: true %>
<%= f.text_field :agency_search, placeholder: "#{l10n('broker_agencies.broker_roles.agency_name_placeholder')}", class: 'form-control w-50 rounded' %>
<div class="input-group-btn ml-2">
<button class="btn btn-select search short" href="#" onclick="brokerSearch(); return false" data-loading-text="Loading...">
<button class="btn btn-select search short" href="#" data-loading-text="Loading...">
<i class="fa fa-search"></i>
<%= l10n("search").to_s %>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<td class="col-6">
<span class="d-flex align-items-center justify-content-between">
<span><%= agency.primary_broker_role&.person&.full_name %></span>
<a href="javascript:void(0)" class='btn btn-primary select-broker-agency float-right' onclick="selectBrokereAgency(this);" data-broker_agency_profile_id="<%= agency._id %>"><%= l10n("select_this_broker_button") %></a>
<a href="#" class='btn btn-primary select-broker-agency float-right' data-broker_agency_profile_id="<%= agency._id %>"><%= l10n("select_this_broker_button") %></a>
</span>
</td>
</tr>
Expand Down

0 comments on commit 54f1f41

Please sign in to comment.