53 lines
2.0 KiB
HTML
53 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<h1 class="page-title">Upload File</h1>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<form method="post" action="/files/upload" enctype="multipart/form-data">
|
|
{% if context_type %}
|
|
<input type="hidden" name="context_type" value="{{ context_type }}">
|
|
<input type="hidden" name="context_id" value="{{ context_id }}">
|
|
{% endif %}
|
|
|
|
<div class="form-grid">
|
|
<div class="form-group full-width">
|
|
<label class="form-label">File *</label>
|
|
<input type="file" name="file" class="form-input" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Folder</label>
|
|
<select name="folder" class="form-input">
|
|
<option value="">/ (root)</option>
|
|
{% for f in folders %}
|
|
<option value="{{ f }}" {{ 'selected' if prefill_folder == f }}>{{ f }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">New Folder</label>
|
|
<input type="text" name="new_folder" class="form-input" placeholder="Or create new folder...">
|
|
</div>
|
|
|
|
<div class="form-group full-width">
|
|
<label class="form-label">Description</label>
|
|
<input type="text" name="description" class="form-input" placeholder="Optional description...">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Tags</label>
|
|
<input type="text" name="tags" class="form-input" placeholder="tag1, tag2, ...">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">Upload</button>
|
|
<a href="/files" class="btn btn-secondary">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|