disable certain org settings fields when selfhost (#627)
This commit is contained in:
parent
b251e1f73c
commit
7e11b8bb5a
|
@ -10,17 +10,18 @@
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">{{'organizationName' | i18n}}</label>
|
<label for="name">{{'organizationName' | i18n}}</label>
|
||||||
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="org.name">
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="org.name"
|
||||||
|
[disabled]="selfHosted">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="billingEmail">{{'billingEmail' | i18n}}</label>
|
<label for="billingEmail">{{'billingEmail' | i18n}}</label>
|
||||||
<input id="billingEmail" class="form-control" type="text" name="BillingEmail"
|
<input id="billingEmail" class="form-control" type="text" name="BillingEmail"
|
||||||
[(ngModel)]="org.billingEmail">
|
[(ngModel)]="org.billingEmail" [disabled]="selfHosted">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="businessName">{{'businessName' | i18n}}</label>
|
<label for="businessName">{{'businessName' | i18n}}</label>
|
||||||
<input id="businessName" class="form-control" type="text" name="BusinessName"
|
<input id="businessName" class="form-control" type="text" name="BusinessName"
|
||||||
[(ngModel)]="org.businessName">
|
[(ngModel)]="org.businessName" [disabled]="selfHosted">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="identifier">{{'identifier' | i18n}}</label>
|
<label for="identifier">{{'identifier' | i18n}}</label>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { Angulartics2 } from 'angulartics2';
|
||||||
|
|
||||||
import { ApiService } from 'jslib/abstractions/api.service';
|
import { ApiService } from 'jslib/abstractions/api.service';
|
||||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||||
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||||
|
|
||||||
import { OrganizationUpdateRequest } from 'jslib/models/request/organizationUpdateRequest';
|
import { OrganizationUpdateRequest } from 'jslib/models/request/organizationUpdateRequest';
|
||||||
|
@ -34,6 +35,7 @@ export class AccountComponent {
|
||||||
@ViewChild('rotateApiKeyTemplate', { read: ViewContainerRef, static: true }) rotateApiKeyModalRef: ViewContainerRef;
|
@ViewChild('rotateApiKeyTemplate', { read: ViewContainerRef, static: true }) rotateApiKeyModalRef: ViewContainerRef;
|
||||||
@ViewChild(TaxInfoComponent) taxInfo: TaxInfoComponent;
|
@ViewChild(TaxInfoComponent) taxInfo: TaxInfoComponent;
|
||||||
|
|
||||||
|
selfHosted = false;
|
||||||
loading = true;
|
loading = true;
|
||||||
canUseApi = false;
|
canUseApi = false;
|
||||||
org: OrganizationResponse;
|
org: OrganizationResponse;
|
||||||
|
@ -46,9 +48,11 @@ export class AccountComponent {
|
||||||
constructor(private componentFactoryResolver: ComponentFactoryResolver,
|
constructor(private componentFactoryResolver: ComponentFactoryResolver,
|
||||||
private apiService: ApiService, private i18nService: I18nService,
|
private apiService: ApiService, private i18nService: I18nService,
|
||||||
private analytics: Angulartics2, private toasterService: ToasterService,
|
private analytics: Angulartics2, private toasterService: ToasterService,
|
||||||
private route: ActivatedRoute, private syncService: SyncService) { }
|
private route: ActivatedRoute, private syncService: SyncService,
|
||||||
|
private platformUtilsService: PlatformUtilsService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
this.selfHosted = this.platformUtilsService.isSelfHost();
|
||||||
this.route.parent.parent.params.subscribe(async (params) => {
|
this.route.parent.parent.params.subscribe(async (params) => {
|
||||||
this.organizationId = params.organizationId;
|
this.organizationId = params.organizationId;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue