|
|
|
|
|
|
|
|
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }} |
|
|
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }} |
|
|
</a> |
|
|
</a> |
|
|
|
|
|
|
|
|
|
|
|
{% if _entity_config['list']['btn_init_export_purchase_order'] is defined %} |
|
|
|
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
|
|
|
href="{{ path('easyadmin', { entity: 'Supplier', action: 'initExportPurchaseOrder' }) }}" |
|
|
|
|
|
target="{{ _action.target }}"> |
|
|
|
|
|
<i class="fa fa-undo"></i> Réinitialiser export bons de commande |
|
|
|
|
|
</a> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
{% if _entity_config['list']['edit_position'] is defined %} |
|
|
{% if _entity_config['list']['edit_position'] is defined %} |
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}" |
|
|
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}" |
|
|
|
|
|
|
|
|
const newValue = this.checked; |
|
|
const newValue = this.checked; |
|
|
const oldValue = !newValue; |
|
|
const oldValue = !newValue; |
|
|
const propertyName = this.closest('.custom-switch').dataset.propertyname; |
|
|
const propertyName = this.closest('.custom-switch').dataset.propertyname; |
|
|
|
|
|
|
|
|
const toggleUrl = "{{ path('easyadmin', { action: 'edit', entity: _entity_config.name, view: 'list' })|raw }}" |
|
|
const toggleUrl = "{{ path('easyadmin', { action: 'edit', entity: _entity_config.name, view: 'list' })|raw }}" |
|
|
+ "&id=" + this.closest('tr').dataset.id |
|
|
+ "&id=" + this.closest('tr').dataset.id |
|
|
+ "&property=" + propertyName |
|
|
+ "&property=" + propertyName |
|
|
|
|
|
|
|
|
let toggleRequest = $.ajax({type: "GET", url: toggleUrl, data: {}, dataType: 'json'}); |
|
|
let toggleRequest = $.ajax({type: "GET", url: toggleUrl, data: {}, dataType: 'json'}); |
|
|
|
|
|
|
|
|
toggleRequest.done(function (response) { |
|
|
toggleRequest.done(function (response) { |
|
|
log(response) |
|
|
|
|
|
setFlashMessages(response.flashMessages); |
|
|
setFlashMessages(response.flashMessages); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|