Fix error when clicking on the disabled publish button
This commit is contained in:
parent
75f1d36218
commit
59c9c5d9bb
|
@ -49,10 +49,10 @@
|
||||||
|
|
||||||
<div class="submit-button"
|
<div class="submit-button"
|
||||||
(click)="updateSecondStep()"
|
(click)="updateSecondStep()"
|
||||||
[ngClass]="{ disabled: !form.valid || isUpdatingVideo === true || videoUploaded !== true }"
|
[ngClass]="{ disabled: isPublishingButtonDisabled() }"
|
||||||
>
|
>
|
||||||
<span class="icon icon-validate"></span>
|
<span class="icon icon-validate"></span>
|
||||||
<input type="button" i18n-value value="Publish" />
|
<input [disabled]="isPublishingButtonDisabled()" type="button" i18n-value value="Publish" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
|
@ -206,6 +206,12 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isPublishingButtonDisabled () {
|
||||||
|
return !this.form.valid ||
|
||||||
|
this.isUpdatingVideo === true ||
|
||||||
|
this.videoUploaded !== true
|
||||||
|
}
|
||||||
|
|
||||||
updateSecondStep () {
|
updateSecondStep () {
|
||||||
if (this.checkForm() === false) {
|
if (this.checkForm() === false) {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue