[FIX] HORILLA AUDIT: Form submission issue fix
This commit is contained in:
@@ -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");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user