Browse Source

Import & stats

feature/export_comptable
Fab 4 years ago
parent
commit
bb53d7c86a
2 changed files with 17 additions and 15 deletions
  1. +4
    -15
      ShopBundle/Resources/public/js/backend/script/default/init-common.js
  2. +13
    -0
      ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig

+ 4
- 15
ShopBundle/Resources/public/js/backend/script/default/init-common.js View File

}); });
$('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(){

+ 13
- 0
ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig View File

{% use '@EasyAdmin/form/bootstrap_4.html.twig' %} {% use '@EasyAdmin/form/bootstrap_4.html.twig' %}




{# TODO à corriger le theme requiert des infos easyAdmin il devrait être possible de ne pas en utiliser #}










{% block form_widget -%} {% block form_widget -%}
{{ parent() }} {{ parent() }}



Loading…
Cancel
Save