Kaynağa Gözat

form_theme : gestion append_html / prepend_html

ideas
Guillaume 3 yıl önce
ebeveyn
işleme
8911c4b88d
1 değiştirilmiş dosya ile 20 ekleme ve 5 silme
  1. +20
    -5
      Resources/views/adminlte/crud/form_theme.html.twig

+ 20
- 5
Resources/views/adminlte/crud/form_theme.html.twig Dosyayı Görüntüle

@@ -9,15 +9,30 @@
<div {% with { attr: row_attr } %}{{ block('attributes') }}{% endwith %}>
{{- form_label(form) -}}
<div class="form-widget">
{% set has_prepend_html = ea.field.prepend_html|default(null) is not null %}
{% set has_append_html = ea.field.append_html|default(null) is not null %}
{% set has_input_groups = has_prepend_html or has_append_html %}

{#
{% set has_prepend_html = ea.field.prepend_html|default(null) is not null %}
{% set has_append_html = ea.field.append_html|default(null) is not null %}
{% set has_input_groups = has_prepend_html or has_append_html %}
#}

{% set has_prepend_html = false %}
{% set has_append_html = false %}
{% set has_input_groups = false %}

{% if ea_crud_form.ea_field is defined and ea_crud_form.ea_field is not null %}
{% set prepend_html = ea_crud_form.ea_field.customOptions.get('prependHtml') %}
{% set append_html = ea_crud_form.ea_field.customOptions.get('appendHtml') %}
{% set has_prepend_html = prepend_html is not null %}
{% set has_append_html = append_html is not null %}
{% set has_input_groups = has_prepend_html or has_append_html %}
{% endif %}

{% if has_input_groups %}
<div class="input-group">{% endif %}
{% if has_prepend_html %}
<div class="input-group-prepend">
<span class="input-group-text">{{ ea.field.prepend_html|raw }}</span>
<span class="input-group-text">{{ prepend_html|raw }}</span>
</div>
{% endif %}

@@ -25,7 +40,7 @@

{% if has_append_html %}
<div class="input-group-append">
<span class="input-group-text">{{ ea.field.append_html|raw }}</span>
<span class="input-group-text">{{ append_html|raw }}</span>
</div>
{% endif %}
{% if has_input_groups %}</div>{% endif %}

Yükleniyor…
İptal
Kaydet