1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-09 05:57:40 +02:00
bitwarden-browser/src/app/vault/add-edit.component.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

857 lines
33 KiB
HTML
Raw Normal View History

<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="cipherAddEditTitle">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
2019-02-21 22:50:37 +01:00
<form
class="modal-content"
#form
(ngSubmit)="submit()"
[appApiAction]="formPromise"
ngNativeValidate
autocomplete="off"
>
2018-06-07 23:12:11 +02:00
<div class="modal-header">
2019-10-11 17:47:41 +02:00
<h2 class="modal-title" id="cipherAddEditTitle">{{ title }}</h2>
2019-10-11 17:22:21 +02:00
<button
type="button"
class="close"
data-dismiss="modal"
appA11yTitle="{{ 'close' | i18n }}"
>
2018-06-07 23:12:11 +02:00
<span aria-hidden="true">&times;</span>
</button>
</div>
2018-06-07 16:21:28 +02:00
<div class="modal-body" *ngIf="cipher">
<app-callout type="info" *ngIf="allowOwnershipAssignment() && !allowPersonal">
{{ "personalOwnershipPolicyInEffect" | i18n }}
</app-callout>
<div class="row" *ngIf="!editMode && !viewOnly">
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="type">{{ "whatTypeOfItem" | i18n }}</label>
<select
id="type"
name="Type"
[(ngModel)]="cipher.type"
class="form-control"
[disabled]="cipher.isDeleted"
appAutofocus
>
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of typeOptions" [ngValue]="o.value">{{ o.name }}</option>
</select>
2021-12-17 15:57:11 +01:00
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="name">{{ "name" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
id="name"
2019-02-21 22:50:37 +01:00
class="form-control"
type="text"
name="Name"
[(ngModel)]="cipher.name"
2021-12-17 15:57:11 +01:00
required
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-07-05 15:42:50 +02:00
<div class="col-6 form-group" *ngIf="!organization">
2018-06-07 16:21:28 +02:00
<label for="folder">{{ "folder" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<select
id="folder"
name="FolderId"
[(ngModel)]="cipher.folderId"
2019-02-21 22:50:37 +01:00
class="form-control"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
>
2018-06-07 16:21:28 +02:00
<option *ngFor="let f of folders" [ngValue]="f.id">{{ f.name }}</option>
</select>
2021-12-17 15:57:11 +01:00
</div>
2018-06-07 15:05:25 +02:00
</div>
2018-06-07 16:21:28 +02:00
<!-- Login -->
2018-06-07 23:12:11 +02:00
<ng-container *ngIf="cipher.type === cipherType.Login">
<div class="row">
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="loginUsername">{{ "username" | i18n }}</label>
<div class="input-group">
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="loginUsername"
class="form-control"
type="text"
name="Login.Username"
[(ngModel)]="cipher.login.username"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
<div class="input-group-append" *ngIf="!cipher.isDeleted">
2021-12-17 15:57:11 +01:00
<button
2019-02-21 22:50:37 +01:00
type="button"
class="btn btn-outline-secondary"
2019-10-11 16:35:24 +02:00
appA11yTitle="{{ 'copyUsername' | i18n }}"
(click)="copy(cipher.login.username, 'username', 'Username')"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2018-06-07 16:21:28 +02:00
</button>
2018-06-07 15:05:25 +02:00
</div>
</div>
2021-12-17 15:57:11 +01:00
</div>
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
2018-06-07 23:12:11 +02:00
<div class="d-flex">
2018-06-07 16:21:28 +02:00
<label for="loginPassword">{{ "password" | i18n }}</label>
<div class="ml-auto d-flex" *ngIf="!cipher.isDeleted && !viewOnly">
2021-12-17 15:57:11 +01:00
<a
href="#"
class="d-block mr-2 bwi-icon-above-input"
2019-02-21 22:50:37 +01:00
appStopClick
appA11yTitle="{{ 'generatePassword' | i18n }}"
2018-07-05 15:42:50 +02:00
(click)="generatePassword()"
*ngIf="cipher.viewPassword"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-lg bwi-fw bwi-generate" aria-hidden="true"></i>
2021-12-17 15:57:11 +01:00
</a>
<a
href="#"
class="d-block bwi-icon-above-input"
#checkPasswordBtn
2019-02-21 22:50:37 +01:00
appStopClick
2018-06-07 16:21:28 +02:00
appA11yTitle="{{ 'checkPassword' | i18n }}"
(click)="checkPassword()"
[appApiAction]="checkPasswordPromise"
2021-12-17 15:57:11 +01:00
>
<i
class="bwi bwi-lg bwi-fw bwi-check-circle"
[hidden]="checkPasswordBtn.loading"
2018-06-07 16:21:28 +02:00
aria-hidden="true"
></i>
<i
class="bwi bwi-lg bwi-fw bwi-spinner bwi-spin"
aria-hidden="true"
2018-06-07 16:21:28 +02:00
[hidden]="!checkPasswordBtn.loading"
title="{{ 'loading' | i18n }}"
></i>
2018-06-07 15:05:25 +02:00
</a>
</div>
2018-06-07 16:21:28 +02:00
</div>
2018-06-07 23:12:11 +02:00
<div class="input-group">
<input
2019-02-21 22:50:37 +01:00
id="loginPassword"
class="form-control text-monospace"
type="{{ showPassword ? 'text' : 'password' }}"
name="Login.Password"
2018-06-20 05:40:51 +02:00
[(ngModel)]="cipher.login.password"
2019-02-21 22:50:37 +01:00
appInputVerbatim
autocomplete="new-password"
[disabled]="cipher.isDeleted || !cipher.viewPassword || viewOnly"
2018-06-07 23:12:11 +02:00
/>
2018-06-09 06:39:14 +02:00
<div class="input-group-append">
2019-02-21 22:50:37 +01:00
<button
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="togglePassword()"
[disabled]="!cipher.viewPassword"
2018-06-07 16:21:28 +02:00
>
2019-02-21 22:50:37 +01:00
<i
class="bwi bwi-lg"
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }"
2018-06-07 16:21:28 +02:00
></i>
2018-06-06 23:25:57 +02:00
</button>
2019-02-21 22:50:37 +01:00
<button
type="button"
class="btn btn-outline-secondary"
2018-06-07 16:21:28 +02:00
appA11yTitle="{{ 'copyPassword' | i18n }}"
(click)="copy(cipher.login.password, 'password', 'Password')"
[disabled]="!cipher.viewPassword"
2018-06-07 16:21:28 +02:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
2018-06-07 16:21:28 +02:00
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-6 form-group">
<label for="loginTotp">{{ "authenticatorKeyTotp" | i18n }}</label>
2019-02-21 22:50:37 +01:00
<input
id="loginTotp"
type="{{ cipher.viewPassword ? 'text' : 'password' }}"
name="Login.Totp"
class="form-control text-monospace"
[(ngModel)]="cipher.login.totp"
appInputVerbatim
[disabled]="cipher.isDeleted || !cipher.viewPassword || viewOnly"
/>
</div>
<div class="col-6 form-group totp d-flex align-items-end" [ngClass]="{ low: totpLow }">
<div *ngIf="!cipher.login.totp || !totpCode">
<img
src="../../images/totp-countdown.png"
Dark Theme (#1017) * Stylesheets * Theme Configuration * Options Area * swal2 style * Icon styling * Fix theme not saving * Update English * Update messages.json * dropdown and login logo * btn-link and totp fix * Organisation Styling * Update webauthn-fallback.ts * Fix contrast issues * Add Paypal Container and Loading svg file * Password Generator contrast fix * Dark Mode Fix buttons and foreground * Fix button hover * Fix Styles after rebase * Add hover on nav dropdown-item * Disable Theme Preview * Options Fix for Default Theme Changes * Updated Colour Scheme * Toast fix * Button and Text Styling * Options Update and Messages Fix * Added Search Icon and Fixed Callout styling * Add theme styling to Stripe * Refactor logic for setting color * Reorder logic to avoid race condition * PayPal Loading and Misc Fix * text-state bug fix * Badge Colour Fix * Remove PayPal Tagline The colour cannot be styled so it's not visible on a dark theme * Adding the Styling from #1131 * Update to New Design * Form and Nav restyle * Modal Opacity and Callout * Nav Colours * Missing Borders * Light theme fix * Improved border for listgroup * Change Org Nav Colour * Save theme to localStorage for persistence * Undo change to Wired image * !Important removal and tweaks * Fix regression with navbar * Light theme by default * Refactor to use getEffectiveTheme * Refactor theme constants to use enum * Set theme in index.html before app loads * Use scss selector to set logo image * Export Sass to TS * Update jslib Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2021-09-30 00:06:20 +02:00
id="totpImage"
title="{{ 'verificationCodeTotp' | i18n }}"
class="ml-2"
/>
<a
2018-07-28 05:38:12 +02:00
href="#"
appStopClick
2018-07-31 04:02:01 +02:00
class="badge badge-primary ml-3"
2018-07-28 05:38:12 +02:00
(click)="premiumRequired()"
2018-07-31 04:02:01 +02:00
*ngIf="!organization && !cipher.organizationId && !canAccessPremium"
2018-07-28 05:38:12 +02:00
>
2018-07-30 14:48:48 +02:00
{{ "premium" | i18n }}
</a>
<a
href="#"
appStopClick
class="badge badge-primary ml-3"
(click)="upgradeOrganization()"
2021-12-17 15:57:11 +01:00
*ngIf="
2018-07-30 14:48:48 +02:00
(organization && !organization.useTotp) ||
2019-02-21 22:50:37 +01:00
(!organization &&
2018-07-30 14:48:48 +02:00
!canAccessPremium &&
cipher.organizationId &&
!cipher.organizationUseTotp)
2021-12-17 15:57:11 +01:00
"
>
2018-07-30 14:48:48 +02:00
{{ "upgrade" | i18n }}
</a>
</div>
<div *ngIf="cipher.login.totp && totpCode" class="d-flex align-items-center">
2020-12-16 21:47:37 +01:00
<span class="totp-countdown mr-3 ml-2">
<span class="totp-sec">{{ totpSec }}</span>
2018-07-28 05:38:12 +02:00
<svg>
<g>
<circle
class="totp-circle inner"
2021-12-17 15:57:11 +01:00
r="12.6"
cy="16"
2021-12-17 15:57:11 +01:00
cx="16"
[ngStyle]="{ 'stroke-dashoffset.px': totpDash }"
2018-06-20 05:40:51 +02:00
></circle>
<circle class="totp-circle outer" r="14" cy="16" cx="16"></circle>
</g>
2021-12-17 15:57:11 +01:00
</svg>
2021-06-21 20:52:34 +02:00
</span>
<span class="totp-code mr-2" title="{{ 'verificationCodeTotp' | i18n }}">{{
totpCodeFormatted
}}</span>
<button
type="button"
class="btn btn-link"
appA11yTitle="{{ 'copyVerificationCode' | i18n }}"
(click)="copy(totpCode, 'verificationCodeTotp', 'TOTP')"
>
<i class="bwi bwi-clone" aria-hidden="true"></i>
2018-06-07 15:05:25 +02:00
</button>
</div>
2021-12-17 15:57:11 +01:00
</div>
</div>
<ng-container *ngIf="cipher.login.hasUris">
<div
class="row"
*ngFor="let u of cipher.login.uris; let i = index; trackBy: trackByFunction"
2021-12-17 15:57:11 +01:00
>
<div class="col-7 form-group">
<label for="loginUri{{ i }}">{{ "uriPosition" | i18n: i + 1 }}</label>
<div class="input-group">
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
class="form-control"
id="loginUri{{ i }}"
type="text"
name="Login.Uris[{{ i }}].Uri"
[(ngModel)]="u.uri"
[disabled]="cipher.isDeleted || viewOnly"
placeholder="{{ 'ex' | i18n }} https://google.com"
appInputVerbatim
2021-12-17 15:57:11 +01:00
/>
<div class="input-group-append">
<button
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'launch' | i18n }}"
2019-10-11 16:35:24 +02:00
(click)="launch(u)"
[disabled]="!u.canLaunch"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-lg bwi-share-square" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
2019-02-21 22:50:37 +01:00
<button
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'copyUri' | i18n }}"
(click)="copy(u.uri, 'uri', 'URI')"
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2018-06-07 05:23:14 +02:00
</button>
2021-12-17 15:57:11 +01:00
</div>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-5 form-group">
2018-06-09 06:39:14 +02:00
<div class="d-flex">
2018-07-19 19:56:44 +02:00
<label for="loginUriMatch{{ i }}">
{{ "matchDetection" | i18n }}
2021-12-17 15:57:11 +01:00
</label>
<a
2019-02-21 22:50:37 +01:00
class="ml-auto"
2022-01-31 20:11:27 +01:00
href="https://bitwarden.com/help/uri-match-detection/"
2019-10-11 16:35:24 +02:00
target="_blank"
rel="noopener"
appA11yTitle="{{ 'learnMore' | i18n }}"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
2021-12-17 15:57:11 +01:00
</a>
</div>
2018-06-09 06:39:14 +02:00
<div class="d-flex">
2021-12-17 15:57:11 +01:00
<select
class="form-control overflow-hidden"
id="loginUriMatch{{ i }}"
name="Login.Uris[{{ i }}].Match"
[(ngModel)]="u.match"
(change)="loginUriMatchChanged(u)"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
>
2019-02-21 22:50:37 +01:00
<option *ngFor="let o of uriMatchOptions" [ngValue]="o.value">
2021-12-17 15:57:11 +01:00
{{ o.name }}
2018-06-07 16:21:28 +02:00
</option>
2018-06-07 15:05:25 +02:00
</select>
2021-12-17 15:57:11 +01:00
<button
2019-02-21 22:50:37 +01:00
type="button"
class="btn btn-link text-danger ml-2"
(click)="removeUri(u)"
appA11yTitle="{{ 'remove' | i18n }}"
*ngIf="!cipher.isDeleted && !viewOnly"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-minus-circle bwi-lg" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
2018-06-06 23:25:57 +02:00
</div>
2021-12-17 15:57:11 +01:00
</div>
</div>
2018-06-07 23:12:11 +02:00
</ng-container>
2021-12-17 15:57:11 +01:00
<a
href="#"
appStopClick
(click)="addUri()"
class="d-inline-block mb-3"
*ngIf="!cipher.isDeleted && !viewOnly"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-plus-circle bwi-fw" aria-hidden="true"></i> {{ "newUri" | i18n }}
2021-12-17 15:57:11 +01:00
</a>
2018-06-07 23:12:11 +02:00
</ng-container>
2018-06-07 16:21:28 +02:00
<!-- Card -->
2018-06-07 23:12:11 +02:00
<ng-container *ngIf="cipher.type === cipherType.Card">
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="cardCardholderName">{{ "cardholderName" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="cardCardholderName"
class="form-control"
type="text"
name="Card.CardCardholderName"
[(ngModel)]="cipher.card.cardholderName"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="cardBrand">{{ "brand" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<select
2019-02-21 22:50:37 +01:00
id="cardBrand"
class="form-control"
name="Card.Brand"
[(ngModel)]="cipher.card.brand"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
>
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of cardBrandOptions" [ngValue]="o.value">{{ o.name }}</option>
</select>
2021-12-17 15:57:11 +01:00
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="cardNumber">{{ "number" | i18n }}</label>
2018-06-07 23:12:11 +02:00
<div class="input-group">
2021-12-17 15:57:11 +01:00
<input
id="cardNumber"
2019-02-21 22:50:37 +01:00
class="form-control text-monospace"
type="{{ showCardNumber ? 'text' : 'password' }}"
name="Card.Number"
[(ngModel)]="cipher.card.number"
appInputVerbatim
autocomplete="new-password"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
<div class="input-group-append">
2021-12-17 15:57:11 +01:00
<button
2018-07-18 05:15:15 +02:00
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="toggleCardNumber()"
2021-12-17 15:57:11 +01:00
>
<i
class="bwi bwi-lg"
2019-10-11 16:35:24 +02:00
aria-hidden="true"
[ngClass]="{
'bwi-eye': !showCardNumber,
'bwi-eye-slash': showCardNumber
}"
2021-12-17 15:57:11 +01:00
></i>
2018-06-07 15:05:25 +02:00
</button>
2021-12-17 15:57:11 +01:00
<button
2018-07-18 05:15:15 +02:00
type="button"
class="btn btn-outline-secondary"
2019-10-11 16:35:24 +02:00
appA11yTitle="{{ 'copyNumber' | i18n }}"
(click)="copy(cipher.card.number, 'number', 'Number')"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2018-06-07 15:05:25 +02:00
</button>
2021-12-17 15:57:11 +01:00
</div>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="col form-group">
<label for="cardExpMonth">{{ "expirationMonth" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<select
2019-02-21 22:50:37 +01:00
id="cardExpMonth"
class="form-control"
2019-02-21 22:50:37 +01:00
name="Card.ExpMonth"
[(ngModel)]="cipher.card.expMonth"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
>
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of cardExpMonthOptions" [ngValue]="o.value">
2021-12-17 15:57:11 +01:00
{{ o.name }}
</option>
</select>
2021-12-17 15:57:11 +01:00
</div>
2018-06-07 16:21:28 +02:00
<div class="col form-group">
<label for="cardExpYear">{{ "expirationYear" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="cardExpYear"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Card.ExpYear"
[(ngModel)]="cipher.card.expYear"
placeholder="{{ 'ex' | i18n }} 2019"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="cardCode">{{ "securityCode" | i18n }}</label>
2018-06-07 23:12:11 +02:00
<div class="input-group">
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="cardCode"
class="form-control text-monospace"
type="{{ showCardCode ? 'text' : 'password' }}"
name="Card.Code"
[(ngModel)]="cipher.card.code"
appInputVerbatim
autocomplete="new-password"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
<div class="input-group-append">
2021-12-17 15:57:11 +01:00
<button
2018-07-18 05:15:15 +02:00
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="toggleCardCode()"
2021-12-17 15:57:11 +01:00
>
<i
class="bwi bwi-lg"
2019-10-11 16:35:24 +02:00
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showCardCode, 'bwi-eye-slash': showCardCode }"
2021-12-17 15:57:11 +01:00
></i>
2018-06-07 15:05:25 +02:00
</button>
2021-12-17 15:57:11 +01:00
<button
2018-07-18 05:15:15 +02:00
type="button"
class="btn btn-outline-secondary"
2019-10-11 16:35:24 +02:00
appA11yTitle="{{ 'securityCode' | i18n }}"
(click)="copy(cipher.card.code, 'securityCode', 'Security Code')"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2018-06-07 15:05:25 +02:00
</button>
2021-12-17 15:57:11 +01:00
</div>
</div>
</div>
</div>
</ng-container>
2018-06-07 16:21:28 +02:00
<!-- Identity -->
2018-06-07 23:12:11 +02:00
<ng-container *ngIf="cipher.type === cipherType.Identity">
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-4 form-group">
<label for="idTitle">{{ "title" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<select
2019-02-21 22:50:37 +01:00
id="idTitle"
class="form-control"
2019-02-21 22:50:37 +01:00
name="Identity.Title"
[(ngModel)]="cipher.identity.title"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
>
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of identityTitleOptions" [ngValue]="o.value">
2021-12-17 15:57:11 +01:00
{{ o.name }}
</option>
</select>
2021-12-17 15:57:11 +01:00
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-4 form-group">
<label for="idFirstName">{{ "firstName" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idFirstName"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.FirstName"
[(ngModel)]="cipher.identity.firstName"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-4 form-group">
<label for="idMiddleName">{{ "middleName" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idMiddleName"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.MiddleName"
[(ngModel)]="cipher.identity.middleName"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-4 form-group">
<label for="idLastName">{{ "lastName" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idLastName"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.LastName"
[(ngModel)]="cipher.identity.lastName"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-4 form-group">
<label for="idUsername">{{ "username" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idUsername"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.Username"
[(ngModel)]="cipher.identity.username"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-4 form-group">
<label for="idCompany">{{ "company" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idCompany"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.Company"
[(ngModel)]="cipher.identity.company"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-4 form-group">
<label for="idSsn">{{ "ssn" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idSsn"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.SSN"
[(ngModel)]="cipher.identity.ssn"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-4 form-group">
<label for="idPassportNumber">{{ "passportNumber" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idPassportNumber"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.PassportNumber"
[(ngModel)]="cipher.identity.passportNumber"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-4 form-group">
<label for="idLicenseNumber">{{ "licenseNumber" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idLicenseNumber"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.LicenseNumber"
[(ngModel)]="cipher.identity.licenseNumber"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="idEmail">{{ "email" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idEmail"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
inputmode="email"
2019-02-21 22:50:37 +01:00
name="Identity.Email"
[(ngModel)]="cipher.identity.email"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="idPhone">{{ "phone" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idPhone"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
inputmode="tel"
2019-02-21 22:50:37 +01:00
name="Identity.Phone"
[(ngModel)]="cipher.identity.phone"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="idAddress1">{{ "address1" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idAddress1"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.Address1"
[(ngModel)]="cipher.identity.address1"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="idAddress2">{{ "address2" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idAddress2"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.Address2"
[(ngModel)]="cipher.identity.address2"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="idAddress3">{{ "address3" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idAddress3"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.Address3"
[(ngModel)]="cipher.identity.address3"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="idCity">{{ "cityTown" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idCity"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.City"
[(ngModel)]="cipher.identity.city"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="idState">{{ "stateProvince" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idState"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.State"
[(ngModel)]="cipher.identity.state"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="idPostalCode">{{ "zipPostalCode" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idPostalCode"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.PostalCode"
[(ngModel)]="cipher.identity.postalCode"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="idCountry">{{ "country" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
id="idCountry"
class="form-control"
2019-02-21 22:50:37 +01:00
type="text"
name="Identity.Country"
[(ngModel)]="cipher.identity.country"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
</div>
</div>
</ng-container>
2018-06-07 16:21:28 +02:00
<div class="form-group">
<label for="notes">{{ "notes" | i18n }}</label>
<textarea
id="notes"
name="Notes"
2021-12-17 15:57:11 +01:00
rows="6"
[(ngModel)]="cipher.notes"
[disabled]="cipher.isDeleted || viewOnly"
class="form-control"
></textarea>
2021-12-17 15:57:11 +01:00
</div>
<app-vault-add-edit-custom-fields
[cipher]="cipher"
[thisCipherType]="cipher.type"
[viewOnly]="viewOnly"
[copy]="copy.bind(this)"
></app-vault-add-edit-custom-fields>
<ng-container *ngIf="allowOwnershipAssignment()">
<h3 class="mt-4">{{ "ownership" | i18n }}</h3>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-5">
<label for="organizationId">{{ "whoOwnsThisItem" | i18n }}</label>
2021-12-17 15:57:11 +01:00
<select
id="organizationId"
class="form-control"
name="OrganizationId"
[(ngModel)]="cipher.organizationId"
(change)="organizationChanged()"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
>
<option *ngFor="let o of ownershipOptions" [ngValue]="o.value">{{ o.name }}</option>
</select>
2021-12-17 15:57:11 +01:00
</div>
</div>
</ng-container>
<ng-container *ngIf="(!editMode || cloneMode) && cipher.organizationId">
<h3 class="mt-4">{{ "collections" | i18n }}</h3>
<div *ngIf="!collections || !collections.length">
{{ "noCollectionsInList" | i18n }}
2021-12-17 15:57:11 +01:00
</div>
<ng-container *ngIf="collections && collections.length">
2019-03-28 16:59:53 +01:00
<div class="form-check" *ngFor="let c of collections; let i = index">
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
class="form-check-input"
type="checkbox"
[(ngModel)]="c.checked"
id="collection-{{ i }}"
name="Collection[{{ i }}].Checked"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
<label class="form-check-label" for="collection-{{ i }}">{{ c.name }}</label>
2021-12-17 15:57:11 +01:00
</div>
</ng-container>
</ng-container>
2018-07-28 05:38:12 +02:00
<ng-container *ngIf="editMode">
2018-07-31 04:02:01 +02:00
<div class="small text-muted mt-4">
2021-12-17 15:57:11 +01:00
<div>
2018-07-28 05:38:12 +02:00
<b class="font-weight-semibold">{{ "dateUpdated" | i18n }}:</b>
{{ cipher.revisionDate | date: "medium" }}
2021-12-17 15:57:11 +01:00
</div>
2018-07-31 04:02:01 +02:00
<div *ngIf="showRevisionDate">
2018-07-28 05:38:12 +02:00
<b class="font-weight-semibold">{{ "datePasswordUpdated" | i18n }}:</b>
2018-07-31 04:02:01 +02:00
{{ cipher.passwordRevisionDisplayDate | date: "medium" }}
2021-12-17 15:57:11 +01:00
</div>
2018-07-31 04:02:01 +02:00
<div *ngIf="hasPasswordHistory">
2018-07-28 05:38:12 +02:00
<b class="font-weight-semibold">{{ "passwordHistory" | i18n }}:</b>
<a href="#" appStopClick (click)="viewHistory()" title="{{ 'view' | i18n }}">
2018-07-30 14:48:48 +02:00
{{ cipher.passwordHistory.length }}
2021-12-17 15:57:11 +01:00
</a>
</div>
<div class="ml-3" *ngIf="viewingPasswordHistory">
2018-07-30 14:48:48 +02:00
<div *ngFor="let ph of cipher.passwordHistory">
{{ ph.lastUsedDate | date: "short" }} -
<span class="generated-wrapper text-monospace ml-2">{{ ph.password }}</span>
2021-12-17 15:57:11 +01:00
</div>
2018-06-06 23:25:57 +02:00
</div>
2021-12-17 15:57:11 +01:00
</div>
</ng-container>
<ng-container *ngIf="canUseReprompt">
<h3 class="mt-4">{{ "options" | i18n }}</h3>
<div class="form-check">
2021-12-17 15:57:11 +01:00
<input
2019-02-21 22:50:37 +01:00
class="form-check-input"
type="checkbox"
[ngModel]="reprompt"
(change)="repromptChanged()"
id="passwordPrompt"
name="passwordPrompt"
[disabled]="cipher.isDeleted || viewOnly"
2021-12-17 15:57:11 +01:00
/>
2021-06-21 20:52:34 +02:00
<label class="form-check-label" for="passwordPrompt">{{
"passwordPrompt" | i18n
2018-06-07 16:21:28 +02:00
}}</label>
2021-12-17 15:57:11 +01:00
<a
2019-10-11 16:35:24 +02:00
target="_blank"
rel="noopener"
appA11yTitle="{{ 'learnMore' | i18n }}"
2022-01-31 20:11:27 +01:00
href="https://bitwarden.com/help/managing-items/#protect-individual-items"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
2021-12-17 15:57:11 +01:00
</a>
</div>
</ng-container>
2021-12-17 15:57:11 +01:00
</div>
2018-06-07 15:05:25 +02:00
<div class="modal-footer">
2021-12-17 15:57:11 +01:00
<button
type="submit"
class="btn btn-primary btn-submit"
[disabled]="form.loading"
*ngIf="!viewOnly"
2021-12-17 15:57:11 +01:00
>
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
<span>{{ (cipher?.isDeleted ? "restore" : "save") | i18n }}</span>
2018-06-07 05:23:14 +02:00
</button>
2018-07-18 05:15:15 +02:00
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
{{ (viewOnly ? "close" : "cancel") | i18n }}
2018-06-07 05:23:14 +02:00
</button>
<div class="ml-auto" *ngIf="cipher && !viewOnly">
2021-12-17 15:57:11 +01:00
<button
2019-02-21 22:50:37 +01:00
*ngIf="!organization && !cipher.isDeleted"
2018-07-18 05:15:15 +02:00
type="button"
(click)="toggleFavorite()"
2019-10-11 16:35:24 +02:00
class="btn btn-link"
appA11yTitle="{{ (cipher.favorite ? 'unfavorite' : 'favorite') | i18n }}"
2021-12-17 15:57:11 +01:00
>
<i
class="bwi bwi-lg"
[ngClass]="{ 'bwi-star-f': cipher.favorite, 'bwi-star': !cipher.favorite }"
2019-10-11 16:35:24 +02:00
aria-hidden="true"
2021-12-17 15:57:11 +01:00
></i>
2018-06-07 05:23:14 +02:00
</button>
2021-12-17 15:57:11 +01:00
<button
2019-02-21 22:50:37 +01:00
#deleteBtn
2018-07-18 05:15:15 +02:00
type="button"
2019-02-21 22:50:37 +01:00
(click)="delete()"
2018-07-18 05:15:15 +02:00
class="btn btn-outline-danger"
appA11yTitle="{{ (cipher.isDeleted ? 'permanentlyDelete' : 'delete') | i18n }}"
*ngIf="editMode && !cloneMode"
[disabled]="deleteBtn.loading"
[appApiAction]="deletePromise"
2021-12-17 15:57:11 +01:00
>
<i
class="bwi bwi-trash bwi-lg bwi-fw"
2019-02-21 22:50:37 +01:00
[hidden]="deleteBtn.loading"
2019-10-11 16:35:24 +02:00
aria-hidden="true"
2021-12-17 15:57:11 +01:00
></i>
<i
class="bwi bwi-spinner bwi-spin bwi-lg bwi-fw"
2019-02-21 22:50:37 +01:00
[hidden]="!deleteBtn.loading"
2019-10-11 16:35:24 +02:00
title="{{ 'loading' | i18n }}"
aria-hidden="true"
2021-12-17 15:57:11 +01:00
></i>
2018-06-07 05:23:14 +02:00
</button>
2021-12-17 15:57:11 +01:00
</div>
</div>
2018-06-07 05:23:14 +02:00
</form>
2018-06-06 23:25:57 +02:00
</div>
</div>