File tree Expand file tree Collapse file tree
hypha/apply/users/templates/users/partials Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 < li class ="flex gap-2 items-center p-2 rounded border bg-base-100 ">
77 {% heroicon_micro "key" class="size-4 text-fg-muted" aria_hidden=true %}
88 < form
9- x-data ="{ dirty: false } "
9+ x-data ="{ pkcurrent: '{{ passkey.name }}', pkinput: '{{ passkey.name }}' } "
1010 hx-post ="{% url 'users:passkey_rename' passkey.pk %} "
1111 hx-target ="#passkey-list "
1212 hx-swap ="outerHTML "
1616 < input
1717 type ="text "
1818 name ="name "
19- value =" {{ passkey.name }} "
19+ x-model =" pkinput "
2020 class ="flex-1 input input-xs input-ghost "
2121 aria-label ="{% trans 'Passkey name' %} "
2222 data-tippy-content ="{% trans 'Click to edit name' %} "
23- @input ="dirty = true "
2423 required
2524 />
26- < button type ="submit " class ="btn btn-ghost btn-xs " :class ="dirty && 'text-success' " title ="{% trans 'Save name' %} ">
25+ < button type ="submit " class ="btn btn-ghost btn-xs text-success " :class ="pkcurrent == pkinput && 'btn-disabled invisible' " title ="{% trans 'Save name' %} ">
2726 {% heroicon_micro "check" class="size-4" aria_hidden=true %}
2827 </ button >
2928 </ form >
You can’t perform that action at this time.
0 commit comments