Skip to content

Commit

Permalink
Merge pull request cypht-org#1150 from Shadow243/sieve-modal-form
Browse files Browse the repository at this point in the history
[FIX]Sieve filters: reset form on add_filter click action
  • Loading branch information
Baraka24 authored Aug 8, 2024
2 parents 7ee1ef4 + 888e5d5 commit ec03343
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 ec03343

Please sign in to comment.