43 lines
1.8 KiB
Django/Jinja
43 lines
1.8 KiB
Django/Jinja
<!-- edit_media.html.j2 -->
|
|
{% extends 'base.html.j2' %}
|
|
|
|
{% block title %}Edit Media{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Edit Media</h1>
|
|
<form method="POST" enctype="multipart/form-data">
|
|
<input type="hidden" name="csrf_token" value="{{ request.session.get_csrf_token() }}">
|
|
|
|
<label for="title">Title:</label>
|
|
<input type="text" name="title" value="{{ media.title }}"><br><br>
|
|
|
|
{% if ascii_content %}
|
|
<label for="ascii_content">Text Content:</label>
|
|
<textarea name="ascii_content" rows="20" cols="80" style="font-family: monospace;">{{ ascii_content }}</textarea><br><br>
|
|
{% endif %}
|
|
|
|
<label for="media_file">Replace Media File (optional):</label>
|
|
<input type="file" name="media_file"
|
|
accept="image/*,audio/*,video/*,text/*,application/pdf,application/json,application/zip"><br><br>
|
|
|
|
<fieldset>
|
|
<legend>Visibility</legend>
|
|
<label>
|
|
<input type="radio" name="visibility" value="public" {% if media.visibility == 'public' %}checked{% endif %}>
|
|
Public - Visible in listings and accessible to all
|
|
</label><br>
|
|
<label>
|
|
<input type="radio" name="visibility" value="private" {% if media.visibility == 'private' %}checked{% endif %}>
|
|
Private - Only accessible to namespace members
|
|
</label><br>
|
|
<label>
|
|
<input type="radio" name="visibility" value="unlisted" {% if media.visibility == 'unlisted' %}checked{% endif %}>
|
|
Unlisted - Accessible via direct link but hidden from listings
|
|
</label>
|
|
</fieldset><br>
|
|
|
|
<button type="submit">Update Media</button>
|
|
</form>
|
|
|
|
<p><a href="{{ request.route_url('view_media_details', namespace_short_id=namespace.short_id, media_short_id=media.short_id) }}">Back to Media Details</a></p>
|
|
{% endblock %}
|