[PM 4983] migrate vault timeout input component (#8661)
* migrate vault timeout input component * migrate vault timeout input component
This commit is contained in:
parent
ace524c8c7
commit
588663f80f
|
@ -1,47 +1,29 @@
|
||||||
<div [formGroup]="form">
|
<div [formGroup]="form">
|
||||||
<div class="form-group">
|
<bit-form-field>
|
||||||
<label for="vaultTimeout">{{ "vaultTimeout" | i18n }}</label>
|
<bit-label>{{ "vaultTimeout" | i18n }}</bit-label>
|
||||||
<select
|
<bit-select formControlName="vaultTimeout">
|
||||||
id="vaultTimeout"
|
<bit-option
|
||||||
name="VaultTimeout"
|
*ngFor="let o of vaultTimeoutOptions"
|
||||||
formControlName="vaultTimeout"
|
[value]="o.value"
|
||||||
class="form-control"
|
[label]="o.name"
|
||||||
>
|
></bit-option>
|
||||||
<option *ngFor="let o of vaultTimeoutOptions" [ngValue]="o.value">{{ o.name }}</option>
|
</bit-select>
|
||||||
</select>
|
<bit-hint class="tw-text-sm">{{
|
||||||
<small class="form-text text-muted">{{
|
|
||||||
((canLockVault$ | async) ? "vaultTimeoutDesc" : "vaultTimeoutLogoutDesc") | i18n
|
((canLockVault$ | async) ? "vaultTimeoutDesc" : "vaultTimeoutLogoutDesc") | i18n
|
||||||
}}</small>
|
}}</bit-hint>
|
||||||
|
</bit-form-field>
|
||||||
|
<div class="tw-grid tw-grid-cols-12 tw-gap-4" *ngIf="showCustom" formGroupName="custom">
|
||||||
|
<bit-form-field class="tw-col-span-6">
|
||||||
|
<bit-label>{{ "customVaultTimeout" | i18n }}</bit-label>
|
||||||
|
<input bitInput type="number" min="0" formControlName="hours" />
|
||||||
|
<bit-hint>{{ "hours" | i18n }}</bit-hint>
|
||||||
|
</bit-form-field>
|
||||||
|
<bit-form-field class="tw-col-span-6 tw-self-end">
|
||||||
|
<input bitInput type="number" min="0" name="minutes" formControlName="minutes" />
|
||||||
|
<bit-hint>{{ "minutes" | i18n }}</bit-hint>
|
||||||
|
</bit-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" *ngIf="showCustom" formGroupName="custom">
|
|
||||||
<label for="customVaultTimeout">{{ "customVaultTimeout" | i18n }}</label>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6">
|
|
||||||
<input
|
|
||||||
id="hours"
|
|
||||||
class="form-control"
|
|
||||||
type="number"
|
|
||||||
min="0"
|
|
||||||
name="hours"
|
|
||||||
formControlName="hours"
|
|
||||||
/>
|
|
||||||
<small>{{ "hours" | i18n }}</small>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
<input
|
|
||||||
id="minutes"
|
|
||||||
class="form-control"
|
|
||||||
type="number"
|
|
||||||
min="0"
|
|
||||||
name="minutes"
|
|
||||||
formControlName="minutes"
|
|
||||||
/>
|
|
||||||
<small>{{ "minutes" | i18n }}</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<small *ngIf="!exceedsMinimumTimout" class="tw-text-danger">
|
<small *ngIf="!exceedsMinimumTimout" class="tw-text-danger">
|
||||||
<i class="bwi bwi-error" aria-hidden="true"></i> {{ "vaultCustomTimeoutMinimum" | i18n }}
|
<i class="bwi bwi-error" aria-hidden="true"></i> {{ "vaultCustomTimeoutMinimum" | i18n }}
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
Loading…
Reference in New Issue