{{ define "title"}}{{ t "page.webauthn_rename.title" }}{{ end }}

{{ define "page_header"}}
<section class="page-header" aria-labelledby="page-header-title">
    <h1 id="page-header-title">{{ t "page.webauthn_rename.title" }}</h1>
</section>
{{ end }}

{{ define "content"}}
<form action="{{ routePath "/webauthn/%s/save" .cred.HandleEncoded }}" method="post" autocomplete="off">
    <input type="hidden" name="csrf" value="{{ .csrf }}">

    {{ if .errorMessage }}
        <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
    {{ end }}

    <label for="form-title">{{ t "page.settings.webauthn.passkey_name" }}</label>
    <input type="text" name="name" id="form-title" value="{{ .form.Name }}" maxlength="255" required autofocus>

    <div class="buttons">
        <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
    </div>
</form>
{{ end }}
