1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

Force sponsorship friendly name to recipient address (#1316)

This commit is contained in:
Matt Gibson 2021-11-24 13:38:38 -06:00 committed by GitHub
parent dca12def8d
commit 9cc7dfb884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 10 deletions

View File

@ -30,10 +30,6 @@
<label for="accountEmail">{{'sponsoredFamiliesEmail' | i18n}}:</label>
<input id="accountEmail" class="form-control" inputmode="email" [(ngModel)]="sponsorshipEmail"
name="sponsorshipEmail" required>
</div>
<div class="form-group col-6">
<label for="friendlyName">{{'friendlyName' | i18n}}:</label>
<input id="friendlyName" class="form-control" [(ngModel)]="friendlyName" name="friendlyName" required>
<button class="btn btn-primary btn-submit mt-4" type="submit" [disabled]="form.loading">
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
<span>{{'redeem' | i18n}}</span>
@ -44,7 +40,7 @@
<table class="table table-hover table-list">
<thead>
<tr>
<th>{{'friendlyName' | i18n}}</th>
<th>{{'recipient' | i18n}}</th>
<th>{{'sponsoringOrg' | i18n}}</th>
<th></th>
</tr>

View File

@ -21,7 +21,6 @@ export class SponsoredFamiliesComponent implements OnInit {
activeSponsorshipOrgs: Organization[] = [];
selectedSponsorshipOrgId: string = '';
sponsorshipEmail: string = '';
friendlyName: string = '';
// Conditional display properties
formPromise: Promise<any>;
@ -38,7 +37,7 @@ export class SponsoredFamiliesComponent implements OnInit {
this.formPromise = this.apiService.postCreateSponsorship(this.selectedSponsorshipOrgId, {
sponsoredEmail: this.sponsorshipEmail,
planSponsorshipType: PlanSponsorshipType.FamiliesForEnterprise,
friendlyName: this.friendlyName,
friendlyName: this.sponsorshipEmail,
});
await this.formPromise;
@ -72,7 +71,6 @@ export class SponsoredFamiliesComponent implements OnInit {
private async resetForm() {
this.sponsorshipEmail = '';
this.friendlyName = '';
this.selectedSponsorshipOrgId = '';
}

View File

@ -4575,8 +4575,8 @@
"redeemNow": {
"message": "Redeem Now"
},
"friendlyName": {
"message": "Friendly Name"
"recipient": {
"message": "Recipient"
},
"removeSponsorship": {
"message": "Remove Sponsorship"