1
0
mirror of https://github.com/bitwarden/web synced 2025-12-10 05:13:40 +00:00

Fix setup provider page (#1106)

* Show only business org create form if provider

* Remove business name from provider views
This commit is contained in:
Matt Gibson
2021-07-30 08:10:00 -05:00
committed by GitHub
parent 18aeeef6fe
commit 9fabdbd0a1
6 changed files with 26 additions and 23 deletions

View File

@@ -18,11 +18,6 @@
<input id="billingEmail" class="form-control" type="text" name="BillingEmail" <input id="billingEmail" class="form-control" type="text" name="BillingEmail"
[(ngModel)]="provider.billingEmail" [disabled]="selfHosted"> [(ngModel)]="provider.billingEmail" [disabled]="selfHosted">
</div> </div>
<div class="form-group">
<label for="businessName">{{'businessName' | i18n}}</label>
<input id="businessName" class="form-control" type="text" name="BusinessName"
[(ngModel)]="provider.businessName" [disabled]="selfHosted">
</div>
</div> </div>
<div class="col-6"> <div class="col-6">
<app-avatar data="{{provider.name}}" dynamic="true" size="75" fontSize="35"></app-avatar> <app-avatar data="{{provider.name}}" dynamic="true" size="75" fontSize="35"></app-avatar>

View File

@@ -17,12 +17,6 @@
<input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail" required> <input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail" required>
</div> </div>
</div> </div>
<div class="row">
<div class="form-group col-6">
<label for="businessName">{{'businessName' | i18n}}</label>
<input id="businessName" class="form-control" type="text" name="BusinessName" [(ngModel)]="businessName">
</div>
</div>
<div class="mt-4"> <div class="mt-4">
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading"> <button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">

View File

@@ -33,7 +33,6 @@ export class SetupComponent implements OnInit {
token: string; token: string;
name: string; name: string;
billingEmail: string; billingEmail: string;
businessName: string;
constructor(private router: Router, private toasterService: ToasterService, constructor(private router: Router, private toasterService: ToasterService,
private i18nService: I18nService, private route: ActivatedRoute, private i18nService: I18nService, private route: ActivatedRoute,
@@ -80,7 +79,6 @@ export class SetupComponent implements OnInit {
const request = new ProviderSetupRequest(); const request = new ProviderSetupRequest();
request.name = this.name; request.name = this.name;
request.billingEmail = this.billingEmail; request.billingEmail = this.billingEmail;
request.businessName = this.businessName;
request.token = this.token; request.token = this.token;
request.key = key; request.key = key;

View File

@@ -29,10 +29,20 @@
<input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail" <input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail"
required> required>
</div> </div>
<div class="form-group col-6" *ngIf="!!providerId">
<label for="email">{{'clientOwnerEmail' | i18n}}</label>
<input id="email" class="form-control" type="text" name="Email" [(ngModel)]="clientOwnerEmail" required>
<small class="text-muted">{{'ownerDesc' | i18n : '20'}}</small>
</div> </div>
<div class="form-group col-6" *ngIf="!!providerId">
<label for="businessName">{{'businessName' | i18n}}</label>
<input id="businessName" class="form-control" type="text" name="BusinessName" [(ngModel)]="businessName">
</div>
</div>
<div *ngIf="!providerId">
<div class="form-group form-check"> <div class="form-group form-check">
<input id="ownedBusiness" class="form-check-input" type="checkbox" name="OwnedBusiness" <input id="ownedBusiness" class="form-check-input" type="checkbox" name="OwnedBusiness" [(ngModel)]="ownedBusiness"
[(ngModel)]="ownedBusiness" (change)="changedOwnedBusiness()"> (change)="changedOwnedBusiness()">
<label for="ownedBusiness" class="form-check-label">{{'accountOwnedBusiness' | i18n}}</label> <label for="ownedBusiness" class="form-check-label">{{'accountOwnedBusiness' | i18n}}</label>
</div> </div>
<div class="row" *ngIf="ownedBusiness"> <div class="row" *ngIf="ownedBusiness">
@@ -41,6 +51,7 @@
<input id="businessName" class="form-control" type="text" name="BusinessName" [(ngModel)]="businessName"> <input id="businessName" class="form-control" type="text" name="BusinessName" [(ngModel)]="businessName">
</div> </div>
</div> </div>
</div>
<h2 class="mt-5">{{'chooseYourPlan' | i18n}}</h2> <h2 class="mt-5">{{'chooseYourPlan' | i18n}}</h2>
<div *ngFor="let selectableProduct of selectableProducts" class="form-check form-check-block"> <div *ngFor="let selectableProduct of selectableProducts" class="form-check form-check-block">
<input class="form-check-input" type="radio" name="product" id="product{{selectableProduct.product}}" <input class="form-check-input" type="radio" name="product" id="product{{selectableProduct.product}}"

View File

@@ -85,6 +85,11 @@ export class OrganizationPlansComponent implements OnInit {
this.ownedBusiness = true; this.ownedBusiness = true;
} }
} }
if (this.providerId) {
this.ownedBusiness = true;
}
this.loading = false; this.loading = false;
} }

View File

@@ -4046,13 +4046,13 @@
"message": "Manage Users must also be enabled with the Manage Password Reset permission" "message": "Manage Users must also be enabled with the Manage Password Reset permission"
}, },
"setupProvider": { "setupProvider": {
"message": "Setup Provider" "message": "Provider Setup"
}, },
"setupProviderLoginDesc": { "setupProviderLoginDesc": {
"message": "You've been invited to setup a new provider. To continue, you need to log in or create a new Bitwarden account." "message": "You've been invited to setup a new provider. To continue, you need to log in or create a new Bitwarden account."
}, },
"setupProviderDesc": { "setupProviderDesc": {
"message": "You have been invited to create a Provider, please enter the details below to complete the setup. Contact customer support if you have any questions." "message": "Please enter the details below to complete the provider setup. Contact Customer Support if you have any questions."
}, },
"providerName": { "providerName": {
"message": "Provider Name" "message": "Provider Name"