forked from Ruderverein-Donau-Linz/rowt
		
	use autofocus
This commit is contained in:
		@@ -15,9 +15,9 @@
 | 
			
		||||
      <div class="-space-y-px rounded-md shadow-sm">
 | 
			
		||||
        <div>
 | 
			
		||||
	  {% if name %}
 | 
			
		||||
          	{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name) }}
 | 
			
		||||
          	{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }}
 | 
			
		||||
	  {% else %}
 | 
			
		||||
          	{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true) }}
 | 
			
		||||
          	{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }}
 | 
			
		||||
 | 
			
		||||
	  {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -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