set title from file; set shortterm to slug
This commit is contained in:
@@ -18,6 +18,16 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<label>
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ form.file_field.label }}</span>
|
||||
{% if form.file_field.errors %}
|
||||
<div class="alert alert-danger">
|
||||
<div class="alert-body">{{ form.file_field.errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input type="file" id="id_file_field" name="file_field" class="text-gray-700 dark:text-gray-200 block w-full mt-1 rounded-md border-gray-300 dark:border-none shadow-sm focus:border-none focus:ring focus:ring-blue-200 dark:focus:ring-sky-700 focus:ring-opacity-50" required>
|
||||
</label>
|
||||
|
||||
<label class="block">
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ form.title.label }}</span>
|
||||
{% if form.title.errors %}
|
||||
@@ -25,13 +35,9 @@
|
||||
<div class="alert-body">{{ form.title.errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input type="text" id="id_title" name="title" class="mt-1 block w-full rounded-md border-gray-300 dark:border-none shadow-sm focus:border-none focus:ring focus:ring-blue-200 dark:focus:ring-sky-700 focus:ring-opacity-50" required>
|
||||
<input type="text" id="id_title" name="title" class="mt-1 block w-full rounded-md border-gray-300 dark:border-none shadow-sm focus:border-none focus:ring focus:ring-blue-200 dark:focus:ring-sky-700 focus:ring-opacity-50">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ form.file_field.label }}</span>
|
||||
<input type="file" id="id_file_field" name="file_field" class="text-gray-700 dark:text-gray-200 block w-full mt-1 rounded-md border-gray-300 dark:border-none shadow-sm focus:border-none focus:ring focus:ring-blue-200 dark:focus:ring-sky-700 focus:ring-opacity-50" required>
|
||||
</label>
|
||||
|
||||
<input type="hidden" name="attachment" value="{{ attachment.id }}" id="id_attachment">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user