fix(): Disable "Log in as this user" when gym doesn't match #631
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not the biggest fan of using native tooltips since they're so slow to render.
But I didn't see any other options being used in this project.
Deviated from bootstrap styles because I didn't feel their "disabled" state did
a very good job of communicating that the button is disabled.
I prefer leaving the button in place rather than hiding it so that users know
what is theoretically possible if they configure the system correctly.
flake8 --config .github/linters/.flake8 ./wger
)and isort (
isort
)Before
Button is enabled but takes you to a 404
![simplescreenrecorder-2021-03-07_20 45 28](https://user-images.githubusercontent.com/2147630/110269244-efc6e000-7f88-11eb-9b24-ddd3ca3e306f.gif)
After
Button is disabled and shows a cursor/tooltip
simplescreenrecorder-2021-03-12_23.03.55.mp4
Fixes #585