Selaa lähdekoodia

Merge branch 'develop'

develop
Fabien Normand 2 vuotta sitten
vanhempi
commit
21debd5eea
4 muutettua tiedostoa jossa 49 lisäystä ja 38 poistoa
  1. +1
    -1
      Authenticator/LoginFormAuthenticator.php
  2. +4
    -1
      Controller/ControllerTrait.php
  3. +1
    -0
      Resources/translations/admin.fr.yaml
  4. +43
    -36
      Resources/views/adminlte/crud/form_theme.html.twig

+ 1
- 1
Authenticator/LoginFormAuthenticator.php Näytä tiedosto

@@ -50,7 +50,7 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator

public function authenticate(Request $request): PassportInterface
{
$email = $request->request->get('email');
$email = trim($request->request->get('email'));
$password = $request->request->get('password');
$csrfToken = $request->request->get('_csrf_token');


+ 4
- 1
Controller/ControllerTrait.php Näytä tiedosto

@@ -39,7 +39,10 @@ use Twig\Environment;

trait ControllerTrait
{
public static function getSubscribedServices()
//TODO si vous avez une erreur avec le :array c'est qu'il faut passer à symfony 5.4.
//Suivez la procédure suivante : https://symfony.com/doc/current/setup/unstable_versions.html#upgrading-your-project-to-an-unstable-symfony-version
//En gros il faut changer tout les dépendances symfony/ qui sont en 5.3 par 5.4 dans composer.json
public static function getSubscribedServices() :array
{
return array_merge(
parent::getSubscribedServices(),

+ 1
- 0
Resources/translations/admin.fr.yaml Näytä tiedosto

@@ -27,6 +27,7 @@ title:

action:
create: Créer
close: Fermer
edit: Modifier
save: Sauvegarder
sort: Ordonner

+ 43
- 36
Resources/views/adminlte/crud/form_theme.html.twig Näytä tiedosto

@@ -23,6 +23,13 @@
value="{% if ea is defined %}{{ ea.request.query.get('referrer') }}{% endif %}">
{% endblock form_start %}

{% block form_end %}
{% if not render_rest is defined or render_rest %}
{{ form_rest(form) }}
{% endif %}
</form>
{% endblock %}

{% block form_row %}
{% set row_attr = row_attr|merge({
class: row_attr.class|default('') ~ ' form-group'
@@ -93,47 +100,47 @@

{% block form_label -%}

{% if label is same as(false) -%}
<label>{# the empty <label> is needed to not break the form design #}</label>
{%- else -%}
{%- if compound is defined and compound -%}
{%- set element = 'legend' -%}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%}
{%- else -%}
{%- set label_attr = label_attr|merge({for: id, class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%}
{%- endif -%}
{% if required -%}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %}
{%- endif -%}
{% if label is empty -%}
{%- if label_format is not empty -%}
{% set label = label_format|replace({
'%name%': name,
'%id%': id,
}) %}
{% if label is same as(false) -%}
<label>{# the empty <label> is needed to not break the form design #}</label>
{%- else -%}
{# {% set label = name|humanize %} #}
{%- endif -%}
{%- endif -%}
{%- if compound is defined and compound -%}
{%- set element = 'legend' -%}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%}
{%- else -%}
{%- set label_attr = label_attr|merge({for: id, class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%}
{%- endif -%}
{% if required -%}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %}
{%- endif -%}
{% if label is empty -%}
{%- if label_format is not empty -%}
{% set label = label_format|replace({
'%name%': name,
'%id%': id,
}) %}
{%- else -%}
{# {% set label = name|humanize %} #}
{%- endif -%}
{%- endif -%}

{% set entityNameOrObject = form.parent.vars.data %}
{% set entityNameOrObject = form.parent.vars.data %}

{% if form.parent.vars.translation_entity_name is defined %}
{% set entityNameOrObject = form.parent.vars.translation_entity_name %}
{% endif %}
{% if form.parent.vars.translation_entity_name is defined %}
{% set entityNameOrObject = form.parent.vars.translation_entity_name %}
{% endif %}

{#
{% if not entityNameOrObject and form.parent.vars.errors.form.config.dataClass is defined %}
{% set entityNameOrObject = form.parent.vars.errors.form.config.dataClass %}
{% endif %}
#}
{#
{% if not entityNameOrObject and form.parent.vars.errors.form.config.dataClass is defined %}
{% set entityNameOrObject = form.parent.vars.errors.form.config.dataClass %}
{% endif %}
#}

<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}
>{{ (label is not empty and '.' in label) ? label|trans({}, translation_domain) : name|sov_trans_admin_field(entityNameOrObject) }}
</{{ element|default('label') }}>
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}
>{{ (label is not empty and '.' in label) ? label|trans({}, translation_domain) : name|sov_trans_admin_field(entityNameOrObject) }}
</{{ element|default('label') }}>

{%- endif -%}
{%- endblock form_label %}
{%- endif -%}
{%- endblock form_label %}

{% block gallery_manager_row %}
{{ block('collection_row') }}
@@ -261,7 +268,7 @@
{% endblock file_manager_widget %}

{% block checkbox_radio_label -%}
{#- Do not display the label if widget is not defined in order to prevent double label rendering -#}
{#- Do not display the label if widget is not defined in order to prevent double label rendering -#}
{%- if widget is defined -%}
{% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class or 'switch-custom' in parent_label_class) %}
{% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class or 'switch-custom' in label_attr.class) %}

Loading…
Peruuta
Tallenna