use autofocus
This commit is contained in:
		| @@ -38,10 +38,10 @@ | ||||
|     <div class="h-8"></div> | ||||
| {% endmacro header %} | ||||
|  | ||||
| {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='') %} | ||||
| {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false) %} | ||||
| <div> | ||||
|   <label for="{{ name }}" class="{% if hide_label %} sr-only {% else %} small text-gray-600 {% endif %}">{{ label }}</label> | ||||
|   <input {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{% if hide_label %}{{ label }}{% endif %}" {% if min %} min="{{ min }}" {% endif %}> | ||||
|   <input {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{% if hide_label %}{{ label }}{% endif %}" {% if min %} min="{{ min }}" {% endif %}{% if autofocus %}autofocus {% endif %}> | ||||
| </div> | ||||
| {% endmacro input %} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user