Fix rollback with only one channel available #23869
Merged
+39
−12
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.
Fixes: mozilla/addons#15804
Description
Fixes the scenario with an add-on with 2 channels, but only one channel available for rollback, where the channel selector was disabled. Now the field on the form is disabled instead so the initial channel value is correctly used.
Also fixes a (separate) bug where the explanation label isn't available because there's no channel selector (and the javascript that sets it is on the channel selector)
Context
I initially thought these two bugs were connected, but turns out they're for different scenarios (two channels, but only one channel available for rollback vs. only one channel)
Testing
optional - repeat with listed
Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.