{# _auth_main_register.html — registration form column. Renders standalone for HTMX fragment responses. Expected context: csrf_token, email, username, error, client_id, app_name, custom_fields, custom_values, is_production #} {% import "_partials/_auth_macros.html" as auth %} {%- if client_id -%} {%- set login_href = "/login?client_id=" ~ client_id -%} {%- else -%} {%- set login_href = "/login" -%} {%- endif -%} {{ auth.kicker(app_name, "Create account", swap_href=login_href, swap_label="Sign in", swap_prefix="") }} Create account Let's get you set up. {{ auth.tabs(active="signup") }} {% if error %} {% set flash = { "kind": "err", "message": error } %} {% include "_partials/_flash.html" %} {% endif %} Email Username {% if custom_fields %} {% for field in custom_fields %} {% if field.field_type == "checkbox" %} {{ field.help_text | default(field.label) }} {% elif field.field_type == "textarea" %} {{ field.label }} {{ custom_values[field.name] | default("", true) }} {% if field.help_text %} {{ field.help_text }} {% endif %} {% elif field.field_type == "select" %} {{ field.label }} Select… {% for opt in field.enum_values %} {{ opt }} {% endfor %} {% if field.help_text %} {{ field.help_text }} {% endif %} {% elif field.field_type == "number" %} {{ field.label }} {% if field.help_text %} {{ field.help_text }} {% endif %} {% else %} {{ field.label }} {% if field.help_text %} {{ field.help_text }} {% endif %} {% endif %} {% endfor %} {% endif %} Password Confirm password Create account → {{ auth.oauth_grid(oauth_providers) }} {{ auth.terms_footer() }}
Let's get you set up.