Commit e0e5407e authored by Andrew Nicols's avatar Andrew Nicols
Browse files

MDL-57550 mod_forum: Set dates to initial checkbox state

parent 190c79ac
......@@ -161,12 +161,12 @@
$('#searchform input[name^=h' + prefix + ']').val(disabled ? 1 : 0);
};
toggleDateFields('from', true);
toggleDateFields('from', !$("#searchform input[name='timefromrestrict']").prop('checked'));
$("#searchform input[name='timefromrestrict']").click(function() {
toggleDateFields('from', !this.checked);
});
toggleDateFields('to', true);
toggleDateFields('to', !$("#searchform input[name='timetorestrict']").prop('checked'));
$("#searchform input[name='timetorestrict']").click(function() {
toggleDateFields('to', !this.checked);
});
......
......@@ -160,12 +160,12 @@ require(['jquery'], function($) {
$('#searchform input[name^=h' + prefix + ']').val(disabled ? 1 : 0);
};
toggleDateFields('from', true);
toggleDateFields('from', !$("#searchform input[name='timefromrestrict']").prop('checked'));
$("#searchform input[name='timefromrestrict']").click(function() {
toggleDateFields('from', !this.checked);
});
toggleDateFields('to', true);
toggleDateFields('to', !$("#searchform input[name='timetorestrict']").prop('checked'));
$("#searchform input[name='timetorestrict']").click(function() {
toggleDateFields('to', !this.checked);
});
......
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