Quellcode durchsuchen

[Backend] Export bons de commande producteurs

feature/export_comptable
Guillaume vor 4 Jahren
Ursprung
Commit
0c2dbcb1f3
2 geänderte Dateien mit 10 neuen und 4 gelöschten Zeilen
  1. +2
    -2
      ShopBundle/Resources/views/backend/default/list-fields/field_toggle.html.twig
  2. +8
    -2
      ShopBundle/Resources/views/backend/default/list.html.twig

+ 2
- 2
ShopBundle/Resources/views/backend/default/list-fields/field_toggle.html.twig Datei anzeigen

@@ -1,8 +1,8 @@
{% trans_default_domain 'EasyAdminBundle' %}

<div class="custom-control custom-switch" data-propertyname="{{ field_options.property }}">
<input type="checkbox" class="custom-control-input" id="customSwitch{{ item.id }}" {{ value == true ? 'checked' }}>
<label class="custom-control-label" for="customSwitch{{ item.id }}">{{ 'label.true'|trans }}</label>
<input type="checkbox" class="custom-control-input" id="customSwitch{{ item.id }}-{{ field_options.property }}" {{ value == true ? 'checked' }}>
<label class="custom-control-label" for="customSwitch{{ item.id }}-{{ field_options.property }}">{{ 'label.true'|trans }}</label>
</div>
{#


+ 8
- 2
ShopBundle/Resources/views/backend/default/list.html.twig Datei anzeigen

@@ -124,6 +124,14 @@
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }}
</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 %}
<a class="float-right btn-sm btn-success action-sort"
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}"
@@ -385,7 +393,6 @@
const newValue = this.checked;
const oldValue = !newValue;
const propertyName = this.closest('.custom-switch').dataset.propertyname;

const toggleUrl = "{{ path('easyadmin', { action: 'edit', entity: _entity_config.name, view: 'list' })|raw }}"
+ "&id=" + this.closest('tr').dataset.id
+ "&property=" + propertyName
@@ -394,7 +401,6 @@
let toggleRequest = $.ajax({type: "GET", url: toggleUrl, data: {}, dataType: 'json'});

toggleRequest.done(function (response) {
log(response)
setFlashMessages(response.flashMessages);
});


Laden…
Abbrechen
Speichern