|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
$('form button[type="submit"]').on('click', function (e) { |
|
|
$('form button[type="submit"]').on('click', function (e) { |
|
|
|
|
|
|
|
|
checkForm() |
|
|
|
|
|
|
|
|
checkForm(); |
|
|
|
|
|
log('ncihe') |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if ($('.select2, select.form-control').length) { |
|
|
if ($('.select2, select.form-control').length) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
$(picker).daterangepicker(options); |
|
|
$(picker).daterangepicker(options); |
|
|
$(picker).on('apply.daterangepicker', function (ev, pickerElm) { |
|
|
$(picker).on('apply.daterangepicker', function (ev, pickerElm) { |
|
|
|
|
|
log($(picker).nextAll('.date-time-range-fields').find('.date-start')); |
|
|
|
|
|
log(pickerElm.startDate.format('YYYY-MM-DD HH:mm')); |
|
|
$(picker).nextAll('.date-time-range-fields').find('.date-start').val(pickerElm.startDate.format('YYYY-MM-DD HH:mm')); |
|
|
$(picker).nextAll('.date-time-range-fields').find('.date-start').val(pickerElm.startDate.format('YYYY-MM-DD HH:mm')); |
|
|
$(picker).nextAll('.date-time-range-fields').find('.date-end').val(pickerElm.endDate.format('YYYY-MM-DD HH:mm')); |
|
|
$(picker).nextAll('.date-time-range-fields').find('.date-end').val(pickerElm.endDate.format('YYYY-MM-DD HH:mm')); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function checkForm() { |
|
|
|
|
|
$('form').addClass('form-sent'); |
|
|
|
|
|
//Panel vues js |
|
|
|
|
|
if ($('form').find('.panel').length) { |
|
|
|
|
|
$('form').find('.panel').each(function (i, panel) { |
|
|
|
|
|
if ($(panel).find(':invalid').length) { |
|
|
|
|
|
$('#nav-params').find('.nav-item:eq(' + i + ')').addClass('has-invalid'); |
|
|
|
|
|
} else { |
|
|
|
|
|
$('#nav-params').find('.nav-item:eq(' + i + ')').removeClass('has-invalid'); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initBtnEditReminder(){ |
|
|
function initBtnEditReminder(){ |