Bläddra i källkod

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Fab 4 år sedan
förälder
incheckning
1132231c6f
2 ändrade filer med 10 tillägg och 4 borttagningar
  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 Visa fil

@@ -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 Visa fil

@@ -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);
});


Laddar…
Avbryt
Spara