{% if iframe %}
  {% if contentType == 'image' %}
    <div class="popup-content">
      <img src="{{ image }}" alt="" width="{{ imageDimensions.width }}" height="{{ imageDimensions.height }}"/>
    </div>
  {% elseif contentType == 'text' %}
    <div class="popup-content">
      {{ text }}
    </div>
  {% else %}
    {{ content }}
  {% endif %}
{% else %}
  <div class="popup-wrapper {{ journal3.classes(classes) }}" data-options='{{ options|json_encode }}'>
    <div class="journal-loading"><em class="fa fa-spinner fa-spin"></em></div>
    <div class="popup-container">
      <div class="popup-body">
        <div class="popup-inner-body">
          <button aria-label="Edit" class="admin-edit" type="button" data-edit="{{ edit }}"><em class="fa fa-pencil" data-placement="auto" data-toggle="tooltip-hover" data-tooltip-class="admin-edit-tooltip" title="Edit {{ name }}"></em></button>
          {% if closeButton %}
            <button class="btn popup-close" aria-label="Close"></button>
          {% endif %}
          {% if headerText %}
            <div class="title popup-header">{{ headerText }}</div>
          {% endif %}
          {% if ajax and contentType == 'grid' %}
            <iframe src="{{ iframe_src }}" width="100%" height="100%" frameborder="0" onload="update_popup_height(this)"></iframe>
          {% elseif contentType == 'image' %}
            <div class="popup-content">
              <img src="{{ image }}" alt="" width="{{ imageDimensions.width }}" height="{{ imageDimensions.height }}"/>
            </div>
          {% elseif contentType == 'text' %}
            <div class="popup-content">
              {{ text }}
            </div>
          {% else %}
            <div class="popup-content">
              {{ content }}
            </div>
          {% endif %}
          {% if footer %}
            <div class="popup-footer">{% if button1 or button2 %}<div class="popup-buttons">
                  {% if button1 %}
                    <a class="btn btn-popup btn-popup-1"{% if button1Link.href %} href="{{ button1Link.href }}"{% endif %}><span class="btn-text">{{ button1Text }}</span></a>
                  {% endif %}
                  {% if button2 %}
                    <a class="btn btn-popup btn-popup-2"{% if button2Link.href %} href="{{ button2Link.href }}"{% endif %}><span class="btn-text">{{ button2Text }}</span></a>
                  {% endif %}
                </div>{% endif %}{% if not ajax and doNotShowAgain %}<label class="popup-dont-show" for="popup-checkbox-el-{{ id }}">
                  <input id="popup-checkbox-el-{{ id }}" type="checkbox" {% if doNotShowAgainChecked %}checked{% endif %}>
                  <span>{{ doNotShowAgainText }}</span>
                </label>{% endif %}</div>
          {% endif %}
        </div>
      </div>
    </div>
    <div class="popup-bg {% if closeButton %}popup-bg-closable{% endif %}"></div>
  </div>
{% endif %}
