1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-03-02 03:41:09 +01:00

credit fixes

This commit is contained in:
Kyle Spearrin 2019-02-20 20:37:27 -05:00
parent fb3afbdc76
commit 041cf1268d
3 changed files with 16 additions and 8 deletions

View File

@ -15,17 +15,20 @@
</div> </div>
--> -->
</div> </div>
<div class="row"> <div class="form-group">
<div class="form-group col-4"> <div class="row">
<label for="creditAmount">{{'amount' | i18n}}</label> <div class="col-4">
<div class="input-group mb-3"> <label for="creditAmount">{{'amount' | i18n}}</label>
<div class="input-group-prepend"><span class="input-group-text">$USD</span></div> <div class="input-group">
<input id="creditAmount" class="form-control" type="text" name="CreditAmount" [(ngModel)]="creditAmount" <div class="input-group-prepend"><span class="input-group-text">$USD</span></div>
(blur)="formatAmount()" required> <input id="creditAmount" class="form-control" type="text" name="CreditAmount" [(ngModel)]="creditAmount"
(blur)="formatAmount()" required>
</div>
</div> </div>
</div> </div>
<small class="form-text text-muted">{{'creditDelayed' | i18n}}</small>
</div> </div>
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading"> <button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading || ppLoading">
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}"></i> <i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}"></i>
<span>{{'submit' | i18n}}</span> <span>{{'submit' | i18n}}</span>
</button> </button>

View File

@ -37,6 +37,7 @@ export class AddCreditComponent implements OnInit {
ppButtonFormAction = WebConstants.paypal.buttonActionProduction; ppButtonFormAction = WebConstants.paypal.buttonActionProduction;
ppButtonBusinessId = WebConstants.paypal.businessIdProduction; ppButtonBusinessId = WebConstants.paypal.businessIdProduction;
ppButtonCustomField: string; ppButtonCustomField: string;
ppLoading = false;
subject: string; subject: string;
formPromise: Promise<any>; formPromise: Promise<any>;
@ -71,6 +72,7 @@ export class AddCreditComponent implements OnInit {
if (this.method === PaymentMethodType.PayPal) { if (this.method === PaymentMethodType.PayPal) {
this.ppButtonFormRef.nativeElement.submit(); this.ppButtonFormRef.nativeElement.submit();
this.ppLoading = true;
return; return;
} }
try { try {

View File

@ -1506,6 +1506,9 @@
"message": "Amount", "message": "Amount",
"description": "Dollar amount, or quantity." "description": "Dollar amount, or quantity."
}, },
"creditDelayed": {
"message": "Added credit will appear on your account after the payment has been fully processed. Some payment methods are delayed and can take longer to process than others."
},
"makeSureEnoughCredit": { "makeSureEnoughCredit": {
"message": "Please make sure that your account has enough credit available for this purchase. If your account does not have enough credit available, your default payment method on file will be used for the difference. You can add credit to your account from the Billing page." "message": "Please make sure that your account has enough credit available for this purchase. If your account does not have enough credit available, your default payment method on file will be used for the difference. You can add credit to your account from the Billing page."
}, },