Fix transfer form reset

This commit is contained in:
Yohann D'ANELLO 2020-08-01 23:03:10 +02:00
parent c0cdb13130
commit 5ccbad8359
1 changed files with 4 additions and 2 deletions

View File

@ -16,11 +16,13 @@ function reset(refresh=true) {
$("#dest_note_list").html(""); $("#dest_note_list").html("");
let source_field = $("#source_note"); let source_field = $("#source_note");
source_field.val(""); source_field.val("");
source_field.trigger("keyup"); let event = jQuery.Event("keyup");
event.originalEvent = {charCode: 97};
source_field.trigger(event);
source_field.removeClass('is-invalid'); source_field.removeClass('is-invalid');
let dest_field = $("#dest_note"); let dest_field = $("#dest_note");
dest_field.val(""); dest_field.val("");
dest_field.trigger("keyup"); dest_field.trigger(event);
dest_field.removeClass('is-invalid'); dest_field.removeClass('is-invalid');
let amount_field = $("#amount"); let amount_field = $("#amount");
amount_field.val(""); amount_field.val("");