Commit 66ae1d2
webadmin: don't put the Generate button on the login page
LoginForm.passphrase and AdminAddForm.passphrase are both named
"passphrase", so WTForms renders both with id="passphrase". The
add-form Generate-button hook used getElementById('passphrase'),
which matched the login form too — a passphrase generator showed up
on the login page, which makes no sense there.
Scope attachAddFormGenerator() to the form.admin-add-form on the
admin list page (the class was already on that <form>); the login
page has no such form, so the button no longer appears there.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3e335a1 commit 66ae1d2
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
131 | 139 | | |
132 | 140 | | |
133 | 141 | | |
| |||
0 commit comments