You are here

modal-page-modal.html.twig in Modal 4.1.x

Default theme implementation to display modal.

File

templates/modal-page-modal.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display modal.
  5. *
  6. * @ingroup templates
  7. * @see modal_page_preprocess_html()
  8. */
  9. #}
  10. <div id="js-modal-page-show-modal" class="{{ modal_class }}" data-modal-options="{{ modal_options }}" data-keyboard="{{ close_modal_esc_key }}" data-backdrop="{{ close_modal_clicking_outside }}" aria-modal="true" {{ enable_modal_header and display_title ? 'aria-labelledby=' ~ id_label }} aria-describedby="{{ id_desc }}" role="dialog" tabindex="-1">
  11. <div class="modal-page-dialog modal-dialog {{ modal_size }}" role="document">
  12. <div class="modal-page-content modal-content">
  13. {# Verify if Modal Header is enabled. #}
  14. {% if enable_modal_header %}
  15. <div class="modal-page-content modal-header {{ modal_header_classes }}">
  16. {# Verify if should Display button X. #}
  17. {% if display_button_x_close %}
  18. <button type="button" class="close js-modal-page-ok-button {{ top_right_button_class }}" data-dismiss="modal">{{ top_right_button_label|raw }}</button>
  19. {% endif %}
  20. {# Verify if should Display Title. #}
  21. {% if display_title %}
  22. <h4 id="{{ id_label }}" class="modal-title modal-page-title">{{ title|raw }}</h4>
  23. {% endif %}
  24. </div>
  25. {% endif %}
  26. {# Show Modal Body #}
  27. <div id="{{ id_desc }}" class="modal-body modal-page-body">
  28. {{ text|raw }}
  29. </div>
  30. {# Verify if Modal footer is enabled. #}
  31. {% if enable_modal_footer %}
  32. <div class="modal-footer modal-page-footer {{ modal_footer_classes }}">
  33. {# Don't Show Again option #}
  34. {% if do_not_show_again %}
  35. <label class ="modal-dont-show-again-label"><input type="checkbox" class="modal-page-please-do-not-show-again" value="{{ id }}"> {{ do_not_show_again }}</label>
  36. {% endif %}
  37. <div class="modal-buttons">
  38. {# Left Button #}
  39. {% if enable_left_button %}
  40. <button type="button" class="btn btn-default js-modal-page-left-button {{ left_button_class }}" data-dismiss="modal">{{ left_label_button }}</button>
  41. {% endif %}
  42. {# Right Button #}
  43. {% if enable_right_button %}
  44. <button type="button" class="btn btn-default js-modal-page-ok-button {{ ok_button_class }}" data-dismiss="modal" {% if enable_redirect_link %} data-redirect="{{ redirect_link }}" {% endif %}>{{ button }}</button>
  45. {% endif %}
  46. </div>
  47. {# Delay to Display #}
  48. <input type="hidden" id="delay_display" name="delay_display" value="{{ delay_display|raw }}" />
  49. </div>
  50. {% endif %}
  51. </div>
  52. </div>
  53. </div>