Yo
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.5.0/velocity.min.js"></script>
<script src="//cdn.jsdelivr.net/velocity/1.5/velocity.ui.min.js"></script>
<input id="restprovider" type="checkbox">
<button>disable checkbox</button>
<button>enable and click checkbox</button>
JavaScript
$('button:first-of-type').on('click', disableCheckbox);
$('button:last-of-type').on('click', enableCheckboxAndClick);
var $restprovider = $('#restprovider');
function disableCheckbox() {
$restprovider.prop("disabled", true);
}
function enableCheckboxAndClick() {
$restprovider.prop('disabled', false);
$restprovider[0].checked
? ($restprovider.click(), $restprovider.prop('checked', false))
: $restprovider.prop('checked', true);
}