[FIX] HORILLA AUDIT: Form submission issue fix

This commit is contained in:
Horilla
2023-11-02 12:33:15 +05:30
parent 1562d955c3
commit dcd7a94e88

View File

@@ -49,31 +49,11 @@
</div> </div>
</div> </div>
<script> <script>
$("#historyFormContainer").ready(function () { $("#historyModalBody").ready(function () {
$("#historyFormContainer")
.find("select[multiple]")
.select2({
createTag: function (params) {
var term = $.trim(params.term);
if (term === "") {
return null;
}
jq;
return {
id: term,
text: term,
newTag: true, // add additional parameters
};
},
tags: true,
tokenSeparators: [",", " "],
});
$("form[method=post] button").click(function (e) { $("form[method=post] button").click(function (e) {
$("#historyModal").addClass("oh-modal--show"); if ($(this).closest("form").find("#historyModal").length && !$(this).closest("form").find("#historyModal.oh-modal--show").length) {
if (!$(this).hasClass("history-modal-button")) {
e.preventDefault(); e.preventDefault();
$("#historyModal").addClass("oh-modal--show");
} }
}); });
}); });