Skip to content

Commit

Permalink
188588717 drop enrollment member (#4801)
Browse files Browse the repository at this point in the history
remove admin onclick events from views
  • Loading branch information
RyanEddyIC authored and bbodine1 committed Dec 18, 2024
1 parent e5b25b2 commit bd99134
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions app/assets/javascripts/inline_replacements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$(document).on('click', ".remove-child-row-btn", function() {
$('tr.child-row:visible').remove();
});

$(document).on('click', ".update-enrollment-end-date-btn", function() {
TerminateWithEarlierDate()
})

$(document).on('click', ".expire-sep-type-end-on-col", function() {
$("#end_on").attr('min', $("#min_date").val())
})
2 changes: 1 addition & 1 deletion app/views/datatables/_drop_enrollment_member.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<% else %>
<h4 class='title'><%= l10n('admin_actions.no_enrollments_to_terminate') %></h4>
<% end %>
<span class="btn btn-default" onclick="$('tr.child-row:visible').remove();"><%= l10n('cancel') %></span>&nbsp;&nbsp;&nbsp;
<span class="btn btn-default remove-child-row-btn"><%= l10n('cancel') %></span>&nbsp;&nbsp;&nbsp;
</td>

<style>.date-picker { width:90px !important;font-size: 12px;} </style>
2 changes: 1 addition & 1 deletion app/views/datatables/_terminate_enrollment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $( "[id^=edit_hbx_enrollment]" ).submit(function( event ) {
<tr><td colspan = "6"><br /></td></tr>
<tr>
<td colspan = "6">
<span class="btn btn-default" onclick="$('tr.child-row:visible').remove();">Cancel</span>&nbsp;&nbsp;&nbsp;
<span class="btn btn-default remove-child-row-btn">Cancel</span>&nbsp;&nbsp;&nbsp;
<%= hidden_field_tag :family_actions_id, params[:family_actions_id] %>
<%= hidden_field_tag :family_id, params[:family] %>
<%= submit_tag "Submit", class: 'btn btn-primary' %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<tr><td colspan = "7"><br /></td></tr>
<tr>
<td colspan = "6">
<span class="btn btn-default" onclick="$('tr.child-row:visible').remove();">Cancel</span>&nbsp;&nbsp;&nbsp;
<span class="btn btn-default remove-child-row-btn">Cancel</span>&nbsp;&nbsp;&nbsp;
<%= hidden_field_tag :family_actions_id, params[:family_actions_id] %>
<button class='btn btn-primary', type="button", onclick = "TerminateWithEarlierDate()" > Submit </button>
<button class='btn btn-primary update-enrollment-end-date-btn', type="button"> Submit </button>
</td>
</tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions app/views/exchanges/manage_sep_types/_expire.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
<td><%= @qle.market_kind %></td>
<td><%= @qle.aasm_state %></td>
<td><%= @qle.start_on %></td>
<td onClick="getElementById('end_on').min = getElementById('min_date').value;"><%= build_option_field(EnrollRegistry[:expire_sep_type].setting(:end_on), f) %></td>
<td class="expire-sep-type-end-on-col"><%= build_option_field(EnrollRegistry[:expire_sep_type].setting(:end_on), f) %></td>
<%= hidden_field_tag :qle_id, @qle.id %>
<%= hidden_field_tag :min_date, TimeKeeper.date_of_record.yesterday.strftime("%Y-%m-%d") %>
<%= hidden_field_tag :qle_action_id, @row %>
</tr>
<tr><td colspan = "7"><br /></td></tr>
<tr>
<td colspan = "6">
<span class="btn btn-default" onclick="$('tr.child-row:visible').remove();">Cancel</span>&nbsp;&nbsp;&nbsp;
<span class="btn btn-default remove-child-row-btn">Cancel</span>&nbsp;&nbsp;&nbsp;
<%= f.hidden_field :updated_by, value: current_user.id %>
<%= f.submit l10n("exchange.manage_sep_types.expire"), :class => "btn btn-primary"%>
</td>
Expand Down

0 comments on commit bd99134

Please sign in to comment.