Select first available channel when accepting ownership change (#3382)
* 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
This commit is contained in:
parent
117c643e45
commit
a3f1595f79
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="submit" i18n-value value="Accept" class="action-button-submit"
|
type="submit" i18n-value value="Accept" class="action-button-submit"
|
||||||
[disabled]="!form.valid"
|
|
||||||
(click)="close()"
|
(click)="close()"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -47,6 +47,11 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
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.videoChangeOwnership = videoChangeOwnership
|
||||||
this.modalService
|
this.modalService
|
||||||
.open(this.modal, { centered: true })
|
.open(this.modal, { centered: true })
|
||||||
|
|
Loading…
Reference in New Issue