You are here

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

Default theme implementation to display modal.

Available Variables:

  • id: Id of modal.
  • close_modal_esc_key: Close modal using ESC key
  • close_modal_clicking_outside: Close modal clicking outside the modal
  • modal_size: size of modal to show.
  • title: Title of modal.
  • text: Text(Body) of modal.
  • do_not_show_again: Don't show again variable for modal.
  • delay_display: Delay to display variable for modal.
  • button: Button text for modal.

File

templates/modal-page-modal.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display modal.
  5. *
  6. * Available Variables:
  7. * - id: Id of modal.
  8. * - close_modal_esc_key: Close modal using ESC key
  9. * - close_modal_clicking_outside: Close modal clicking outside the modal
  10. * - modal_size: size of modal to show.
  11. * - title: Title of modal.
  12. * - text: Text(Body) of modal.
  13. * - do_not_show_again: Don't show again variable for modal.
  14. * - delay_display: Delay to display variable for modal.
  15. * - button: Button text for modal.
  16. *
  17. * @ingroup templates
  18. * @see modal_page_preprocess_html()
  19. */
  20. #}
  21. <div class="modal fade" id="js-modal-page-show-modal" role="dialog" style="display: none;" data-modal-id="{{ id }}" data-keyboard="{{ close_modal_esc_key }}" data-backdrop="{{ close_modal_clicking_outside }}" tabindex="-1">
  22. <div class="modal-page-dialog modal-dialog {{ modal_size }}">
  23. <div class="modal-page-content modal-content">
  24. <div class="modal-page-content modal-header">
  25. <button type="button" class="close" data-dismiss="modal">&times;</button>
  26. <h4 class="modal-title modal-page-title">{{ title|raw }}</h4>
  27. </div>
  28. <div class="modal-body modal-page-body">
  29. {{ text|raw }}
  30. </div>
  31. <div class="modal-footer modal-page-footer">
  32. {% if do_not_show_again %}
  33. <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>
  34. {% endif %}
  35. <input type="hidden" id="delay_display" name="delay_display" value="{{ delay_display|raw }}" />
  36. <button type="button" class="btn btn-default js-modal-page-ok-buttom" data-dismiss="modal">{{ button }}</button>
  37. </div>
  38. </div>
  39. </div>
  40. </div>