Skip to content

Commit

Permalink
Select first available channel when accepting ownership change (#3382)
Browse files Browse the repository at this point in the history
* Select first available channel when accepting ownership change

Implements #2240

* Made use of #patchValue() to set the default selected value

And removed the disabled state for the Accept button
  • Loading branch information
Poslovitch committed Dec 1, 2020
1 parent 117c643 commit a3f1595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ <h1 i18n class="modal-title">Accept ownership</h1>

<input
type="submit" i18n-value value="Accept" class="action-button-submit"
[disabled]="!form.valid"
(click)="close()"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit {
}

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 })
Expand Down

0 comments on commit a3f1595

Please sign in to comment.