{% extends "base.html" %} {% block tab_title %}{{ source.journalist_designation }}{% endblock %} {% block body %}

{{ source.journalist_designation }}

{% if source.collection %}

{{ gettext('All messages, files, and replies from sources are stored as encrypted files for security. To read them, you will need to decrypt them on your Secure Viewing Station.') }}

{{ gettext('Delete Selected') }}
{% for doc in source.collection %} {% with %} {% if doc.filename.endswith('reply.gpg') %} {% if not doc.deleted_by_source %} {% set status = gettext('Unread') %} {% set icon = 'reply' %} {% else %} {% set status = gettext('Read') %} {% set icon = 'check' %} {% endif %} {% elif not doc.seen %} {% set status = gettext('Unread') %} {% set icon = 'envelope-closed' %} {% set extra_classes = 'unread-cb' %} {% else %} {% set status = gettext('Read') %} {% set icon = 'envelope-open' %} {% endif %} {% endwith %} {% with %} {% if doc.filename.endswith('-doc.gz.gpg') %} {% set type = gettext('Uploaded File') %} {% set icon = 'files' %} {% elif doc.filename.endswith('-reply.gpg') %} {% set type = gettext('Reply') %} {% set icon = 'reply' %} {% else %} {% set type = gettext('Message') %} {% set icon = 'messages' %} {% endif %} {% endwith %} {% endfor %}
{{ doc.filename }} {{ doc.size|filesizeformat() }} {{ type }}
{% with %} {% set modal_data = { "modal_id": "delete-selected-confirmation-modal", "modal_header": gettext('Delete Confirmation'), "modal_body": gettext('Are you sure you want to delete the selected submissions?'), "cancel_id": "cancel-selected-deletions", "submit_id": "delete-selected", "submit_btn_type": "danger", "submit_btn_text": gettext('DELETE') } %} {% include '_confirmation_modal.html' %} {% endwith %}
{% else %}

{{ gettext('No submissions to display.') }}

{% endif %}

{{ gettext('Reply') }}

{% if has_key %}

{{ gettext('You can write a secure reply to the person who submitted these messages and/or files:') }}

{{ form.message(id="reply-text-field", rows='10', class="journalist-reply__input", placeholder=gettext('Write a reply.'), **{'aria-label': gettext('Write a reply.')}) }}
{% else %}

{{ gettext("This source has no encryption key.") }}

{{ gettext("An encryption key will be generated for the source the next time they log in, after which you will be able to reply to the source here.") }}

{% endif %}
{% with %} {% set modal_data = { "modal_id": "delete-collection-confirmation-modal", "modal_header": gettext('Are you sure?'), "modal_body": gettext('

Deleting the account for {source} will:

All files, messages, and replies will also be deleted when their account is deleted.

').format(source=source.journalist_designation), "cancel_id": "cancel-collection-deletions", "submit_id": "delete-collection-button", "submit_btn_type": "danger", "submit_btn_text": gettext('Yes, Delete Source Account') } %} {% include '_confirmation_modal.html' %} {% endwith %}
{% endblock %}