Fix browser password auto-fill and checkbox visibility in the repository page.
Review Request #10808 — Created Nov. 27, 2019 and updated
This fixes up a couple of long-standing issues in the repository
configuration page. The first and most major is a fix to prevent the
browser from trying to auto-fill the username and password fields for a
repository with the user's own credentials, which is almost never going
to be correct. Browsers try very hard to do this if they see anything
that remotely looks like a password field, and while we attempted to
combat that in the past, browsers have gotten smarter.
The better trick, which has worked on RBCommons for a long while, has
been to create a password field higher up on the page that is visible
but located far off-screen, and doesn't contain a form field name so it
won't be sent to the server. This takes care of the issue on all major
The other fix is for the "Use hosting service's bug tracker" checkbox,
which was showing up for hosting services that didn't include bug
tracker support. It was greyed out, but its presence was still
confusing. We now hide that checkbox's row entirely.
Tested the page on Chrome and Firefox. The browser was no longer
filling in the password.
Tested the bug tracker checkbox for all supported hosting services,
making sure it was only present when it could be enabled.