Fix error when clicking on the disabled publish button

pull/1156/head
Chocobozzz 2018-10-01 09:04:43 +02:00
parent 75f1d36218
commit 59c9c5d9bb
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 8 additions and 2 deletions

View File

@ -49,10 +49,10 @@
<div class="submit-button"
(click)="updateSecondStep()"
[ngClass]="{ disabled: !form.valid || isUpdatingVideo === true || videoUploaded !== true }"
[ngClass]="{ disabled: isPublishingButtonDisabled() }"
>
<span class="icon icon-validate"></span>
<input type="button" i18n-value value="Publish" />
<input [disabled]="isPublishingButtonDisabled()" type="button" i18n-value value="Publish" />
</div>
</div>
</form>

View File

@ -206,6 +206,12 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
)
}
isPublishingButtonDisabled () {
return !this.form.valid ||
this.isUpdatingVideo === true ||
this.videoUploaded !== true
}
updateSecondStep () {
if (this.checkForm() === false) {
return