{%- set hx_attrs = {"post": h.url_for('user.api_tokens', id=user.id ), "swap": "outerHTML"} -%} {%- call ui.util.call(ui.form, method="POST", hx=hx_attrs) -%} {%- block base_fields -%} {{ ui.input(name="name", label=_("Name"), required=true, value=data.name, errors=errors.name) }} {%- endblock base_fields %} {%- call ui.util.call(ui.form_actions) -%} {%- block form_actions -%} {{ ui.button(_('Create API Token'), type="submit") }} {%- endblock form_actions %} {%- endcall %} {%- endcall %} {% if created %} {% endif %}