show input labels in default case

This commit is contained in:
Philipp
2023-04-28 21:06:14 +02:00
parent 253018580a
commit e51bd5882f
3 changed files with 9 additions and 7 deletions

View File

@ -24,9 +24,11 @@
<div class="h-8"></div>
{% endmacro header %}
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='') %}
<label for="{{ name }}" class="sr-only">{{ label }}</label>
<input id="{{ name }}" name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{{ label }}" {% if min %} min="{{ min }}" {% endif %}>
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false) %}
<div>
<label for="{{ name }}" class="{% if hide_label %} sr-only {% else %} small text-gray-600 {% endif %}">{{ label }}</label>
<input id="{{ name }}" name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{% if hide_label %}{{ label }}{% endif %}" {% if min %} min="{{ min }}" {% endif %}>
</div>
{% endmacro input %}
{% macro checkbox(label, name, id='', checked=false) %}