Skip to content

Commit

Permalink
reset form on add_filter click action
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadow243 committed Aug 7, 2024
1 parent a6ea5b6 commit 888e5d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/sievefilters/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ $(function () {
edit_filter_modal.setTitle('Add Filter');
current_account = $(this).attr('account');
edit_filter_modal.open();

// Reset the form fields when opening the modal
$(".modal_sieve_filter_name").val('');
$(".modal_sieve_script_priority").val('');
$(".sieve_list_conditions_modal").empty();
$(".filter_actions_modal_table").empty();
});
$('.add_script').on('click', function () {
edit_script_modal.setTitle('Add Script');
Expand Down

0 comments on commit 888e5d5

Please sign in to comment.