<div class="modal-dialog" role="document">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
            <h4 class="modal-title">Notification Text Preview</h4>
        </div>
        <div class="modal-body">
            % if text:
            % for item in text:
            <div style="padding-bottom: 10px;">
                <h4>
                    ${item['media_type'].capitalize()}
                    % if item['media_type'] != 'server':
                    <span class="inline-pre">&lt;${item['media_type']}&gt;&lt;/${item['media_type']}&gt;</span> tags
                    % endif
                </h4>
                % if agent != 'webhook':
                <pre>${item['subject']}</pre>
                % endif
                % if agent != 'scripts':
                <pre>${item['body']}</pre>
                % endif
            </div>
            % endfor
            % else:
            <div style="text-align: center;"><i class="fa fa-exclamation-circle"></i> Failed to generate preview.</div>
            % endif
        </div>
        <div class="modal-footer">
        </div>
    </div>
</div>