2021-03-24 19:10:26 +01:00
|
|
|
const $ = require('jquery');
|
|
|
|
|
|
|
|
module.exports = function() {
|
|
|
|
$('.custom-file-input').on('change', function(event) {
|
|
|
|
let inputFile = event.currentTarget;
|
|
|
|
|
|
|
|
$(inputFile).parent()
|
|
|
|
.find('.custom-file-label')
|
|
|
|
.html(inputFile.files[0].name);
|
|
|
|
});
|
2021-05-13 19:43:14 +02:00
|
|
|
|
|
|
|
$('.nav a').each(function() {
|
|
|
|
const link = $(this)
|
|
|
|
const href = link.attr('href')
|
|
|
|
|
|
|
|
if (href.substr(0, 1) !== '#') {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(href)
|
|
|
|
|
|
|
|
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 19:10:26 +01:00
|
|
|
};
|