templates/partials/setup/clear-cache.html.twig line 1

Open in your IDE?
  1. <button type="button" class="button button--full-height" id="clear-cache-button" data-dialog="#clear-cache">{{ 'setup.buttons.clear_cache_button'|trans }}</button>
  2. {% embed 'includes/dialog.html.twig' with {
  3.     id: 'clear-cache',
  4.     background: 'blur',
  5.     title: 'setup.clear_cache.title'|trans
  6. } %}
  7.     {% import 'macros/forms.html.twig' as forms %}
  8.     {% block body %}
  9.         <form id="cache-form">
  10.             <p>
  11.                 {{ forms.switch({
  12.                     label: 'setup.clear_cache.clear_all'|trans,
  13.                     name: 'clear-all',
  14.                     id: 'clear-all',
  15.                     checked: true
  16.                 }) }}
  17.                 <small class="d-block">{{ 'setup.clear_cache.clear_description'|trans }}</small>
  18.             </p>
  19.             <ul id="clear-individual" class="no-list mb-4 p-2 bd-dark" hidden>
  20.                 {% set clears = [
  21.                     {
  22.                         value: 'lookup',
  23.                         label: 'setup.clear_cache.lookup_label'|trans,
  24.                         note: 'setup.clear_cache.lookup_note'|trans
  25.                     },
  26.                     {
  27.                         value: 'characters',
  28.                         label: 'setup.clear_cache.characters_label'|trans,
  29.                         note: 'setup.clear_cache.characters_note'|trans
  30.                     },
  31.                     {
  32.                         value: 'tokens',
  33.                         label: 'setup.clear_cache.tokens_label'|trans,
  34.                         note: 'setup.clear_cache.tokens_note'|trans
  35.                     },
  36.                     {
  37.                         value: 'inputs',
  38.                         label: 'setup.clear_cache.inputs_label'|trans,
  39.                         note: 'setup.clear_cache.inputs_note'|trans
  40.                     },
  41.                     {
  42.                         value: 'details',
  43.                         label: 'setup.clear_cache.details_label'|trans,
  44.                         note: 'setup.clear_cache.details_note'|trans
  45.                     },
  46.                     {
  47.                         value: 'infoTokens',
  48.                         label: 'setup.clear_cache.info_tokens_label'|trans,
  49.                         note: 'setup.clear_cache.info_tokens_note'|trans
  50.                     },
  51.                     {
  52.                         value: 'names',
  53.                         label: 'setup.clear_cache.names_label'|trans,
  54.                         note: 'setup.clear_cache.names_note'|trans
  55.                     },
  56.                     {
  57.                         value: 'height',
  58.                         label: 'setup.clear_cache.height_label'|trans,
  59.                         note: 'setup.clear_cache.height_note'|trans
  60.                     },
  61.                 ] %}
  62.                 {% for clear in clears %}
  63.                     <li>
  64.                         {{ forms.switch({
  65.                             node: 'div',
  66.                             label: clear.label,
  67.                             name: 'clear',
  68.                             id: 'clear-' ~ clear.value,
  69.                             value: clear.value,
  70.                             checked: true
  71.                         }) }}
  72.                         <small class="d-block">{{ clear.note }}</small>
  73.                     </li>
  74.                 {% endfor %}
  75.             </ul>
  76.             <p>
  77.                 {{ forms.switch({
  78.                     label: 'setup.clear_cache.clear_refresh_label'|trans,
  79.                     name: 'clear-refresh',
  80.                     id: 'clear-refresh',
  81.                     checked: true
  82.                 }) }}
  83.                 <small class="d-block">{{ 'setup.clear_cache.clear_refresh_note'|trans }}</small>
  84.             </p>
  85.             <p id="token-warning"><small>{{ 'setup.clear_cache.warning'|trans|raw }}</small></p>
  86.             <p id="info-token-warning"><small>{{ 'setup.clear_cache.info_token_warning'|trans|raw }}</small></p>
  87.             <p><button type="submit" class="button">{{ 'setup.clear_cache.clear_cache'|trans }}</button></p>
  88.         </form>
  89.     {% endblock %}
  90. {% endembed %}