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