Fix rendering of copyable text input widgets.
Review Request #12465 — Created July 12, 2022 and submitted
The copyable text input widget (used for things like auto-generated IDs)
wasn't rendering properly. The major problem here is that Django changed
internally how things like theTextInput
widget rendered. What was
happening is that even calling the superclass'render()
method, it was
usingself.template_name
. This would render two copies of the copyable
text input widget template, one of which didn't have the correct
context. I've changed it to explicitly render the text input template.We also had a CSS precedence issue which was causing the copy icon to be
rendered in blue. I've made the CSS rule for this icon to be a bit
higher priority so it doesn't get overridden.
- Used the OAuth application edit form (which uses this widget in a
couple different ways) and saw the correct result rather than having
no text boxes and two copy icons. - Ran unit tests on all supported versions of Python.
Summary | ID |
---|---|
f208dd0e506f7a8a837d18afe4eaa8e2ccf1ca8d |
Description | From | Last Updated |
---|---|---|
Can you verify whether unit tests pass for Python 3.7-3.10? |
chipx86 |
- Testing Done:
-
~ Used the OAuth application edit form (which uses this widget in a couple
~ different ways) and saw the correct result rather than having no text ~ - Used the OAuth application edit form (which uses this widget in a
couple different ways) and saw the correct result rather than having
no text boxes and two copy icons.
~ - Ran unit tests on all supported versions of Python.
- boxes and two copy icons. - Used the OAuth application edit form (which uses this widget in a