update show to DetailViews, add UpdateViews and CreateView
This commit is contained in:
10
fet2020/templates/baseform/body.html
Normal file
10
fet2020/templates/baseform/body.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<label class="block">
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ field.label }}</span>
|
||||
{% if field.errors %}
|
||||
<div class="alert alert-danger">
|
||||
<div class="alert-body">{{ field.errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ media }}
|
||||
{{ field }}
|
||||
</label>
|
||||
13
fet2020/templates/baseform/date_time.html
Normal file
13
fet2020/templates/baseform/date_time.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<label>
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ field.label }}</span>
|
||||
{% if field.errors %}
|
||||
<div class="alert alert-danger">
|
||||
<div class="alert-body">{{ field.errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input type="date" id="id_{{ field.name }}_0" name="{{ field.name }}_0" value="{{ field.value|date:"Y-m-d" }}" {% if field.required %}required{% endif %} class="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">
|
||||
<input type="time" id="id_{{ field.name }}_1" name="{{ field.name }}_1" value="{{ field.value|time }}" {% if field.required %}required{% endif %} class="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">
|
||||
{% if field.help_text %}
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ field.help_text }}</span>
|
||||
{% endif %}
|
||||
</label>
|
||||
7
fet2020/templates/baseform/non_field_errors.html
Normal file
7
fet2020/templates/baseform/non_field_errors.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if form.non_field_errors %}
|
||||
<div class="alert alert-danger">
|
||||
<i class="alert-icon fa-solid fa-check-circle"></i>
|
||||
<h2 class="alert-title">Fehler:</h2>
|
||||
<div class="alert-body">{{ form.non_field_errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
13
fet2020/templates/baseform/select.html
Normal file
13
fet2020/templates/baseform/select.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<label>
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ field.label }}</span>
|
||||
{% if field.errors %}
|
||||
<div class="alert alert-danger">
|
||||
<div class="alert-body">{{ field.errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<select id="id_{{ field.name }}" name="{{ field.name }}" {% if field.required %}required{% endif %} class="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">
|
||||
{% for elem in field %}
|
||||
{{ elem }}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
12
fet2020/templates/baseform/text.html
Normal file
12
fet2020/templates/baseform/text.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<label class="block">
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ field.label }}</span>
|
||||
{% if field.errors %}
|
||||
<div class="alert alert-danger">
|
||||
<div class="alert-body">{{ field.errors }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input type="text" id="id_{{ field.name }}" name="{{ field.name }}" value="{{ field.value }}" {% if field.required %}required{% endif %} 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">
|
||||
{% if field.help_text %}
|
||||
<span class="text-gray-700 dark:text-gray-200">{{ field.help_text }}</span>
|
||||
{% endif %}
|
||||
</label>
|
||||
Reference in New Issue
Block a user