1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"
[(ngModel)]="provider.billingEmail" [disabled]="selfHosted">
</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 class="col-6">
<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>
</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">
<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;
name: string;
billingEmail: string;
businessName: string;
constructor(private router: Router, private toasterService: ToasterService,
private i18nService: I18nService, private route: ActivatedRoute,
@ -80,7 +79,6 @@ export class SetupComponent implements OnInit {
const request = new ProviderSetupRequest();
request.name = this.name;
request.billingEmail = this.billingEmail;
request.businessName = this.businessName;
request.token = this.token;
request.key = key;

View File

@ -29,17 +29,28 @@
<input id="billingEmail" class="form-control" type="text" name="BillingEmail" [(ngModel)]="billingEmail"
required>
</div>
</div>
<div class="form-group form-check">
<input id="ownedBusiness" class="form-check-input" type="checkbox" name="OwnedBusiness"
[(ngModel)]="ownedBusiness" (change)="changedOwnedBusiness()">
<label for="ownedBusiness" class="form-check-label">{{'accountOwnedBusiness' | i18n}}</label>
</div>
<div class="row" *ngIf="ownedBusiness">
<div class="form-group col-6">
<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 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">
<input id="ownedBusiness" class="form-check-input" type="checkbox" name="OwnedBusiness" [(ngModel)]="ownedBusiness"
(change)="changedOwnedBusiness()">
<label for="ownedBusiness" class="form-check-label">{{'accountOwnedBusiness' | i18n}}</label>
</div>
<div class="row" *ngIf="ownedBusiness">
<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>
<h2 class="mt-5">{{'chooseYourPlan' | i18n}}</h2>
<div *ngFor="let selectableProduct of selectableProducts" class="form-check form-check-block">

View File

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

View File

@ -4046,13 +4046,13 @@
"message": "Manage Users must also be enabled with the Manage Password Reset permission"
},
"setupProvider": {
"message": "Setup Provider"
"message": "Provider Setup"
},
"setupProviderLoginDesc": {
"message": "You've been invited to setup a new provider. To continue, you need to log in or create a new Bitwarden account."
},
"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": {
"message": "Provider Name"