Commit dd7212a8 authored by Son Nguyen's avatar Son Nguyen
Browse files

Bug 1597117: Fix form validate for required inputs for MS Edge

behatnotneeded

Change-Id: Ifa3503d5192f3454c56c24825d51c9b63acd2ea4
parent c0d4fecc
......@@ -117,6 +117,22 @@ jQuery(function($) {
$(document).ready(function() {
// For some reasons, form validation for required select element generated by select2js
// does not work properly on Microsoft Edge
// This is a workaround
// It will check if the required select is not empty and remove the attribute 'required'
$j('#editaccess_submit').click(function(e) {
$j('#editaccess select:required').each(function() {
if ($j(this).val()) {
$j(this).prop("required", false);
}
else {
e.preventDefault();
e.stopPropagation();
}
});
});
function setDatePicker(target) {
target.datetimepicker({
dateFormat: "{{str(tag='pieform_calendar_dateformat' section='langconfig')|pieform_element_calendar_convert_dateformat}}",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment