From 61961b24e2d88b18b2dc8ac3f4d22dd5587b1820 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 23 Jul 2023 18:16:26 +0200 Subject: [PATCH] use autofocus --- templates/auth/login.html.tera | 4 ++-- templates/includes/macros.html.tera | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/auth/login.html.tera b/templates/auth/login.html.tera index a099df4..02fbdca 100644 --- a/templates/auth/login.html.tera +++ b/templates/auth/login.html.tera @@ -15,9 +15,9 @@
{% 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 %}
diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index d82c00a..f2a9a67 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -38,10 +38,10 @@
{% 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) %}
- +
{% endmacro input %}