fix: Fix status change form (#4598)

* fix: Fix status change form

Also make it so that select2 search fields get focus when they open.

* Remove feat
This commit is contained in:
Lars Eggert 2022-10-18 17:59:04 +03:00 committed by GitHub
parent 5f7c585252
commit 66533827e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,12 +14,12 @@ $(document)
.remove();
});
form.on("keydown", ".new-relation-row input[type=text]", function () {
form.on("keydown change", ".new-relation-row select", function () {
var top = $(this)
.closest(".new-relation-row");
top.removeClass("new-relation-row");
top.find(".delete")
.prop('Disabled', false)
.prop('disabled', false)
.removeClass("btn-outline-danger")
.addClass("btn-danger");
top.find("input,select")
@ -28,5 +28,6 @@ $(document)
});
++counter;
top.after(newRowHtml);
setupSelect2Field(form.find(".new-relation-row .select2-field"));
});
});
});