33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
<!--
|
|
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
{{ define "title" -}}
|
|
{{( pgettext "Upload Media" "title" )}}
|
|
{{- end }}
|
|
|
|
{{ define "content" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/media.uploadForm*/ -}}
|
|
{{ template "settings-tabs" "media" }}
|
|
<form id="mediaUpload" enctype="multipart/form-data" action="/admin/media" method="post" data-hx-boost="true">
|
|
<h2>{{( pgettext "Upload Media" "title" )}}</h2>
|
|
{{ CSRFInput }}
|
|
<fieldset>
|
|
{{ with .File -}}
|
|
<label>
|
|
{{( pgettext "File" "input" )}}
|
|
<input type="file" name="{{ .Name }}"
|
|
required {{ template "error-attrs" . }}><br>
|
|
</label>
|
|
<p>{{ printf (gettext "Maximum upload file size: %s") (.MaxSize | humanizeBytes) }}</p>
|
|
{{ template "error-message" . }}
|
|
{{- end }}
|
|
</fieldset>
|
|
<footer>
|
|
<button type="submit">{{( pgettext "Upload" "action" )}}</button>
|
|
<progress value="0" max="100"></progress>
|
|
</footer>
|
|
</form>
|
|
<script>camperUploadForm(document.getElementById('mediaUpload'))</script>
|
|
{{- end }}
|