mirror of
https://github.com/bitwarden/web
synced 2025-12-30 23:23:34 +00:00
Disable personal imports if Personal Ownership policy applies (#1176)
* Disable imports if personal ownership policy set * Add missing await
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
<div class="page-header">
|
||||
<h1>{{'importData' | i18n}}</h1>
|
||||
</div>
|
||||
<app-callout type="info" *ngIf="importBlockedByPolicy">
|
||||
{{'personalOwnershipPolicyInEffectImports' | i18n}}
|
||||
</app-callout>
|
||||
<form #form (ngSubmit)="submit()" ngNativeValidate>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="type">1. {{'selectFormat' | i18n}}</label>
|
||||
<select id="type" name="Format" [(ngModel)]="format" class="form-control" required>
|
||||
<select id="type" name="Format" [(ngModel)]="format" class="form-control"
|
||||
[disabled]="importBlockedByPolicy" required>
|
||||
<option *ngFor="let o of featuredImportOptions" [ngValue]="o.id">{{o.name}}</option>
|
||||
<ng-container *ngIf="importOptions && importOptions.length">
|
||||
<option value="-" disabled></option>
|
||||
@@ -240,15 +244,17 @@
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="file">2. {{'selectImportFile' | i18n}}</label>
|
||||
<input type="file" id="file" class="form-control-file" name="file">
|
||||
<input type="file" id="file" class="form-control-file" name="file" [disabled]="importBlockedByPolicy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="fileContents">{{'orCopyPasteFileContents' | i18n}}</label>
|
||||
<textarea id="fileContents" class="form-control" name="FileContents" [(ngModel)]="fileContents"></textarea>
|
||||
<textarea id="fileContents" class="form-control" name="FileContents" [(ngModel)]="fileContents"
|
||||
[disabled]="importBlockedByPolicy"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="loading">
|
||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="loading || importBlockedByPolicy"
|
||||
[ngClass]="{manual:importBlockedByPolicy}">
|
||||
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
||||
<span>{{'importData' | i18n}}</span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user