* Select first available channel when accepting ownership change
Implements https://github.com/Chocobozzz/PeerTube/issues/2240
* Made use of #patchValue() to set the default selected value
And removed the disabled state for the Accept button
<input
type="submit" i18n-value value="Accept" class="action-button-submit"
<input
type="submit" i18n-value value="Accept" class="action-button-submit"
- [disabled]="!form.valid"
(click)="close()"
>
</div>
(click)="close()"
>
</div>
}
show (videoChangeOwnership: VideoChangeOwnership) {
}
show (videoChangeOwnership: VideoChangeOwnership) {
+ // Select the first available channel by default
+ this.form.patchValue({
+ channel: this.videoChannels[0].id
+ })
+
this.videoChangeOwnership = videoChangeOwnership
this.modalService
.open(this.modal, { centered: true })
this.videoChangeOwnership = videoChangeOwnership
this.modalService
.open(this.modal, { centered: true })