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> <label for="accountEmail">{{'sponsoredFamiliesEmail' | i18n}}:</label>
<input id="accountEmail" class="form-control" inputmode="email" [(ngModel)]="sponsorshipEmail" <input id="accountEmail" class="form-control" inputmode="email" [(ngModel)]="sponsorshipEmail"
name="sponsorshipEmail" required> 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"> <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> <i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
<span>{{'redeem' | i18n}}</span> <span>{{'redeem' | i18n}}</span>
@ -44,7 +40,7 @@
<table class="table table-hover table-list"> <table class="table table-hover table-list">
<thead> <thead>
<tr> <tr>
<th>{{'friendlyName' | i18n}}</th> <th>{{'recipient' | i18n}}</th>
<th>{{'sponsoringOrg' | i18n}}</th> <th>{{'sponsoringOrg' | i18n}}</th>
<th></th> <th></th>
</tr> </tr>

View File

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

View File

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