2021-03-24 12:27:07 +01:00
|
|
|
const $ = require('jquery');
|
|
|
|
|
|
|
|
module.exports = function() {
|
2021-06-15 11:31:52 +02:00
|
|
|
$('body').on('change', '.custom-file-input', function(event) {
|
2021-03-24 12:27:07 +01:00
|
|
|
let inputFile = event.currentTarget;
|
|
|
|
|
|
|
|
$(inputFile).parent()
|
|
|
|
.find('.custom-file-label')
|
|
|
|
.html(inputFile.files[0].name);
|
|
|
|
});
|
2021-05-13 19:43:49 +02:00
|
|
|
|
|
|
|
$('.nav a').each(function() {
|
|
|
|
const link = $(this)
|
|
|
|
const href = link.attr('href')
|
|
|
|
|
|
|
|
if (href.substr(0, 1) !== '#') {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
const tab = $('.tab-pane ' + href)
|
|
|
|
|
|
|
|
if (!tab.length) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tab.find('.form-error-message').length) {
|
|
|
|
link.addClass('border border-danger')
|
|
|
|
link.click()
|
|
|
|
}
|
|
|
|
})
|
2021-03-24 12:27:07 +01:00
|
|
|
};
|