Add a way to hide sensitive content once it's displayed

This commit is contained in:
Thomas Sileo
2019-08-16 12:04:23 +02:00
parent a9fa483bcc
commit 558fb9c310
2 changed files with 16 additions and 0 deletions

View File

@@ -156,12 +156,25 @@
<div style="clear:both">
<form action="{{redir}}" class="action-form" method="GET" style="display:inline-block">
<input type="hidden" name="show_sensitive" value="{{perma_id}}">
{% if request.path == url_for("admin.admin_lookup") %}
<input type="hidden" name="url" value="{{obj.id}}">
{% endif %}
<button type="submit" class="bar-item-reverse">display sensitive content</button>
</form>
</div>
{% else %}
{% if obj.sensitive %}
<div style="clear:both;margin-bottom: 20px;">
<form action="{{redir}}" class="action-form" method="GET" style="display:inline-block">
{% if request.path == url_for("admin.admin_lookup") %}
<input type="hidden" name="url" value="{{obj.id}}">
{% endif %}
<button type="submit" class="bar-item-reverse">hide sensitive content</button>
</form>
</div>
{% endif %}
{% if obj.attachment | not_only_imgs %}
<h3 class="l">Attachments</h3>
<ul style="padding:0;">