[ Index ]

PHP Cross Reference of phpBB-3.3.11-deutsch

title

Body

[close]

/vendor/symfony/twig-bridge/Resources/views/Form/ -> bootstrap_base_layout.html.twig (source)

   1  {% use "form_div_layout.html.twig" %}
   2  
   3  {# Widgets #}
   4  
   5  {% block textarea_widget -%}
   6      {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %}
   7      {{- parent() -}}
   8  {%- endblock textarea_widget %}
   9  
  10  {% block money_widget -%}
  11      {% set prepend = not (money_pattern starts with '{{') %}
  12      {% set append = not (money_pattern ends with '}}') %}
  13      {% if prepend or append %}
  14          <div class="input-group{{ group_class|default('') }}">
  15              {% if prepend %}
  16                  <span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
  17              {% endif %}
  18              {{- block('form_widget_simple') -}}
  19              {% if append %}
  20                  <span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
  21              {% endif %}
  22          </div>
  23      {% else %}
  24          {{- block('form_widget_simple') -}}
  25      {% endif %}
  26  {%- endblock money_widget %}
  27  
  28  {% block percent_widget -%}
  29      <div class="input-group">
  30          {{- block('form_widget_simple') -}}
  31          <span class="input-group-addon">%</span>
  32      </div>
  33  {%- endblock percent_widget %}
  34  
  35  {% block datetime_widget -%}
  36      {%- if widget == 'single_text' -%}
  37          {{- block('form_widget_simple') -}}
  38      {%- else -%}
  39          {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
  40          <div {{ block('widget_container_attributes') }}>
  41              {{- form_errors(form.date) -}}
  42              {{- form_errors(form.time) -}}
  43  
  44              <div class="sr-only">
  45                  {%- if form.date.year is defined %}{{ form_label(form.date.year) }}{% endif -%}
  46                  {%- if form.date.month is defined %}{{ form_label(form.date.month) }}{% endif -%}
  47                  {%- if form.date.day is defined %}{{ form_label(form.date.day) }}{% endif -%}
  48                  {%- if form.time.hour is defined %}{{ form_label(form.time.hour) }}{% endif -%}
  49                  {%- if form.time.minute is defined %}{{ form_label(form.time.minute) }}{% endif -%}
  50                  {%- if form.time.second is defined %}{{ form_label(form.time.second) }}{% endif -%}
  51              </div>
  52  
  53              {{- form_widget(form.date, { datetime: true } ) -}}
  54              {{- form_widget(form.time, { datetime: true } ) -}}
  55          </div>
  56      {%- endif -%}
  57  {%- endblock datetime_widget %}
  58  
  59  {% block date_widget -%}
  60      {%- if widget == 'single_text' -%}
  61          {{- block('form_widget_simple') -}}
  62      {%- else -%}
  63          {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
  64          {%- if datetime is not defined or not datetime -%}
  65              <div {{ block('widget_container_attributes') -}}>
  66          {%- endif %}
  67              <div class="sr-only">
  68                  {{ form_label(form.year) }}
  69                  {{ form_label(form.month) }}
  70                  {{ form_label(form.day) }}
  71              </div>
  72  
  73              {{- date_pattern|replace({
  74                  '{{ year }}': form_widget(form.year),
  75                  '{{ month }}': form_widget(form.month),
  76                  '{{ day }}': form_widget(form.day),
  77              })|raw -}}
  78          {%- if datetime is not defined or not datetime -%}
  79              </div>
  80          {%- endif -%}
  81      {%- endif -%}
  82  {%- endblock date_widget %}
  83  
  84  {% block time_widget -%}
  85      {%- if widget == 'single_text' -%}
  86          {{- block('form_widget_simple') -}}
  87      {%- else -%}
  88          {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
  89          {%- if datetime is not defined or false == datetime -%}
  90              <div {{ block('widget_container_attributes') -}}>
  91          {%- endif -%}
  92          <div class="sr-only">{{ form_label(form.hour) }}</div>
  93          {{- form_widget(form.hour) -}}
  94          {%- if with_minutes -%}:<div class="sr-only">{{ form_label(form.minute) }}</div>{{ form_widget(form.minute) }}{%- endif -%}
  95          {%- if with_seconds -%}:<div class="sr-only">{{ form_label(form.second) }}</div>{{ form_widget(form.second) }}{%- endif -%}
  96          {%- if datetime is not defined or false == datetime -%}
  97              </div>
  98          {%- endif -%}
  99      {%- endif -%}
 100  {%- endblock time_widget %}
 101  
 102  {%- block dateinterval_widget -%}
 103      {%- if widget == 'single_text' -%}
 104          {{- block('form_widget_simple') -}}
 105      {%- else -%}
 106          {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%}
 107          <div {{ block('widget_container_attributes') }}>
 108              {{- form_errors(form) -}}
 109              <div class="table-responsive">
 110                  <table class="table {{ table_class|default('table-bordered table-condensed table-striped') }}" role="presentation">
 111                      <thead>
 112                      <tr>
 113                          {%- if with_years %}<th>{{ form_label(form.years) }}</th>{% endif -%}
 114                          {%- if with_months %}<th>{{ form_label(form.months) }}</th>{% endif -%}
 115                          {%- if with_weeks %}<th>{{ form_label(form.weeks) }}</th>{% endif -%}
 116                          {%- if with_days %}<th>{{ form_label(form.days) }}</th>{% endif -%}
 117                          {%- if with_hours %}<th>{{ form_label(form.hours) }}</th>{% endif -%}
 118                          {%- if with_minutes %}<th>{{ form_label(form.minutes) }}</th>{% endif -%}
 119                          {%- if with_seconds %}<th>{{ form_label(form.seconds) }}</th>{% endif -%}
 120                      </tr>
 121                      </thead>
 122                      <tbody>
 123                      <tr>
 124                          {%- if with_years %}<td>{{ form_widget(form.years) }}</td>{% endif -%}
 125                          {%- if with_months %}<td>{{ form_widget(form.months) }}</td>{% endif -%}
 126                          {%- if with_weeks %}<td>{{ form_widget(form.weeks) }}</td>{% endif -%}
 127                          {%- if with_days %}<td>{{ form_widget(form.days) }}</td>{% endif -%}
 128                          {%- if with_hours %}<td>{{ form_widget(form.hours) }}</td>{% endif -%}
 129                          {%- if with_minutes %}<td>{{ form_widget(form.minutes) }}</td>{% endif -%}
 130                          {%- if with_seconds %}<td>{{ form_widget(form.seconds) }}</td>{% endif -%}
 131                      </tr>
 132                      </tbody>
 133                  </table>
 134              </div>
 135              {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%}
 136          </div>
 137      {%- endif -%}
 138  {%- endblock dateinterval_widget -%}
 139  
 140  {% block choice_widget_collapsed -%}
 141      {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
 142      {{- parent() -}}
 143  {%- endblock choice_widget_collapsed %}
 144  
 145  {% block choice_widget_expanded -%}
 146      {%- if '-inline' in label_attr.class|default('') -%}
 147          {%- for child in form %}
 148              {{- form_widget(child, {
 149                  parent_label_class: label_attr.class|default(''),
 150                  translation_domain: choice_translation_domain,
 151              }) -}}
 152          {% endfor -%}
 153      {%- else -%}
 154          <div {{ block('widget_container_attributes') }}>
 155              {%- for child in form %}
 156                  {{- form_widget(child, {
 157                      parent_label_class: label_attr.class|default(''),
 158                      translation_domain: choice_translation_domain,
 159                  }) -}}
 160              {%- endfor -%}
 161          </div>
 162      {%- endif -%}
 163  {%- endblock choice_widget_expanded %}
 164  
 165  {# Labels #}
 166  
 167  {% block choice_label -%}
 168      {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #}
 169      {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': '', 'checkbox-custom': '', 'radio-custom': ''})|trim}) -%}
 170      {{- block('form_label') -}}
 171  {% endblock choice_label %}
 172  
 173  {% block checkbox_label -%}
 174      {{- block('checkbox_radio_label') -}}
 175  {%- endblock checkbox_label %}
 176  
 177  {% block radio_label -%}
 178      {{- block('checkbox_radio_label') -}}
 179  {%- endblock radio_label %}
 180  
 181  {# Rows #}
 182  
 183  {% block button_row -%}
 184      <div class="form-group">
 185          {{- form_widget(form) -}}
 186      </div>
 187  {%- endblock button_row %}
 188  
 189  {% block choice_row -%}
 190      {%- set force_error = true -%}
 191      {{- block('form_row') -}}
 192  {%- endblock choice_row %}
 193  
 194  {% block date_row -%}
 195      {%- set force_error = true -%}
 196      {{- block('form_row') -}}
 197  {%- endblock date_row %}
 198  
 199  {% block time_row -%}
 200      {%- set force_error = true -%}
 201      {{- block('form_row') -}}
 202  {%- endblock time_row %}
 203  
 204  {% block datetime_row -%}
 205      {%- set force_error = true -%}
 206      {{- block('form_row') -}}
 207  {%- endblock datetime_row %}


Generated: Sat Nov 4 14:26:03 2023 Cross-referenced by PHPXref 0.7.1