Fix error in form when scheduling video publication

pull/1935/head
Chocobozzz 2019-06-07 11:35:06 +02:00
parent f238aec54f
commit 4adf26735f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ export abstract class FormReactive {
// Don't care if dirty on force check
const isDirty = control.dirty || forceCheck === true
if (control && isDirty && !control.valid) {
if (control && isDirty && control.enabled && !control.valid) {
const messages = validationMessages[ field ]
for (const key of Object.keys(control.errors)) {
formErrors[ field ] += messages[ key ] + ' '

View File

@ -189,7 +189,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
}
private trackPrivacyChange () {
// We will update the "support" field depending on the channel
// We will update the schedule input and the wait transcoding checkbox validators
this.form.controls[ 'privacy' ]
.valueChanges
.pipe(map(res => parseInt(res.toString(), 10)))