upload.unturf.com/templates/edit_media.html.j2
Russell Ballestrini d7416d2bae init
new file:   .gitignore
	new file:   app.py
	new file:   requirements.txt
	new file:   templates/base.html.j2
	new file:   templates/edit_media.html.j2
	new file:   templates/home.html.j2
	new file:   templates/import_user_record.html.j2
	new file:   templates/list_media.html.j2
	new file:   templates/login.html.j2
	new file:   templates/profile.html.j2
	new file:   templates/upload_media.html.j2
	new file:   templates/user_media.html.j2
	new file:   templates/verify.html.j2
	new file:   templates/view_media.html.j2
	new file:   templates/view_media_details.html.j2
2024-12-29 15:21:59 -05:00

35 lines
1.5 KiB
Django/Jinja

{% extends 'base.html.j2' %}
{% block title %}Edit Media{% endblock %}
{% block content %}
<h1>Edit Media</h1>
<form method="POST" enctype="multipart/form-data">
<label for="title">Title (optional):</label>
<input type="text" name="title" value="{{ media.title }}" placeholder="Enter a title for the media"><br><br>
<label for="media_file">Replace Media File (leave blank to keep current):</label>
<input type="file" name="media_file" accept="image/*,audio/*,video/*"><br><br>
<label>
<input type="checkbox" name="is_public" {% if media.is_public %}checked{% endif %}>
Make Media Public
</label><br><br>
<button type="submit">Update</button>
</form>
<p>
<!-- View and Download links -->
<a href="{{ request.route_url('view_media', user_short_id=request.user.short_id, media_short_id=media.short_id) }}">View</a> |
<a href="{{ request.route_url('view_media', user_short_id=request.user.short_id, media_short_id=media.short_id, _query={'download': 'true'}) }}">Download</a> |
<a href="{{ request.route_url('view_media_details', user_short_id=request.user.short_id, media_short_id=media.short_id) }}">Back to Media Details</a>
</p>
<br/>
<form action="{{ request.route_url('delete_media', user_short_id=request.user.short_id, media_short_id=media.short_id) }}" method="post">
<button type="submit" onclick="return confirm('Are you sure you want to delete this media?');" style="border: 0px; background-color: #AA0000; color: white;">Delete</button>
</form>
{% endblock %}