mirror of
https://github.com/bitwarden/browser
synced 2024-12-24 17:11:55 +01:00
PR feedback, loading spinner
This commit is contained in:
parent
e523733b2c
commit
4502a966a1
@ -49,7 +49,11 @@
|
||||
<h1>{{'taxInformation' | i18n}}</h1>
|
||||
</div>
|
||||
<p>{{'taxInformationDesc' | i18n}}</p>
|
||||
<form *ngIf="org && !loading" #formTax (ngSubmit)="submitTaxInfo()" [appApiAction]="formPromise" ngNativeValidate>
|
||||
<div *ngIf="!org || loading">
|
||||
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'loading' | i18n}}</span>
|
||||
</div>
|
||||
<form *ngIf="org && !loading" #formTax (ngSubmit)="submitTaxInfo()" [appApiAction]="taxFormPromise" ngNativeValidate>
|
||||
<app-tax-info></app-tax-info>
|
||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="formTax.loading">
|
||||
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
||||
|
@ -38,6 +38,7 @@ export class AccountComponent {
|
||||
canUseApi = false;
|
||||
org: OrganizationResponse;
|
||||
formPromise: Promise<any>;
|
||||
taxFormPromise: Promise<any>;
|
||||
|
||||
private organizationId: string;
|
||||
private modal: ModalComponent = null;
|
||||
@ -74,8 +75,8 @@ export class AccountComponent {
|
||||
}
|
||||
|
||||
async submitTaxInfo() {
|
||||
this.formPromise = this.taxInfo.submitTaxInfo();
|
||||
await this.formPromise;
|
||||
this.taxFormPromise = this.taxInfo.submitTaxInfo();
|
||||
await this.taxFormPromise;
|
||||
this.analytics.eventTrack.next({ action: 'Updated Organization Tax Info' });
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('taxInfoUpdated'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user