Skip to content
Snippets Groups Projects
Commit 9b8f62b4 authored by Jan Mach's avatar Jan Mach
Browse files

Fixed the issue with validating the form on Cancel button.

(Redmine issue: #7519)
parent 0d0a9206
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,11 @@ $(function() {
$('#datetimepicker-from-2').data("DateTimePicker").maxDate(e.date);
});
// Disable built-in JS form validation in case the form`s cancel button is clicked.`
$('input[type="submit"][value="Cancel"]').click(function(){
$(this).parents('form:first').attr('novalidate', 'novalidate');
});
// Initialize linked date and datetime picker components.
$('#datetimepicker-hm-from').datetimepicker({
locale: GLOBAL_LOCALE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment