Skip to content

Commit

Permalink
fix: replace $ with jQuery for consistency in terminate enrollment sc…
Browse files Browse the repository at this point in the history
…ript
  • Loading branch information
bbodine1 committed Jan 23, 2025
1 parent 4bca203 commit 33fb268
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/views/datatables/terminate_enrollment.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ else {
$('.dropdown.pull-right').removeClass('open');
}



$('[id^="terminate_hbx_"]').click(function($) {
jQuery('[id^="terminate_hbx_"]').click(function($) {
if (this.checked) {
$(jQuery(this).closest('tr').find('[type=checkbox]')[1]).prop('disabled', false);
jQuery(jQuery(this).closest('tr').find('[type=checkbox]')[1]).prop('disabled', false);
}
else {
$($(this).closest('tr').find('[type=checkbox]')[1]).prop('disabled', true);
$($(this).closest('tr').find('[type=checkbox]')[1]).prop('checked', false);
jQuery(jQuery(this).closest('tr').find('[type=checkbox]')[1]).prop('disabled', true);
jQuery(jQuery(this).closest('tr').find('[type=checkbox]')[1]).prop('checked', false);
}
});

$( "[id^=edit_hbx_enrollment]" ).submit(function( event ) {
if($('input[id^="termination_date_picker"]').val().length !=0)
this.submit();
this.submit();
else {
event.preventDefault();
alert("Please select a valid date.");
Expand Down

0 comments on commit 33fb268

Please sign in to comment.