Skip to content

webadmin: don't put the Generate button on the login page#38

Merged
tridge merged 1 commit into
ArduPilot:mainfrom
tridge:pr-tweaks3
May 12, 2026
Merged

webadmin: don't put the Generate button on the login page#38
tridge merged 1 commit into
ArduPilot:mainfrom
tridge:pr-tweaks3

Conversation

@tridge
Copy link
Copy Markdown
Contributor

@tridge tridge commented May 12, 2026

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

); the login page has no such form, so the button no longer appears there.

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>
@tridge tridge merged commit 66ae1d2 into ArduPilot:main May 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant