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

483 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>
2018-06-07 15:05:25 +02:00
</div>
</div>
<div class="row">
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="name">{{'name' | i18n}}</label>
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="cipher.name" required
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02: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>
<select id="folder" name="FolderId" [(ngModel)]="cipher.folderId" class="form-control"
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
<option *ngFor="let f of folders" [ngValue]="f.id">{{f.name}}</option>
</select>
2018-06-07 15:05:25 +02:00
</div>
</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">
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="loginUsername">{{'username' | i18n}}</label>
2018-06-07 23:12:11 +02:00
<div class="input-group">
2019-02-21 22:50:37 +01:00
<input id="loginUsername" class="form-control" type="text" name="Login.Username"
[(ngModel)]="cipher.login.username" appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly">
<div class="input-group-append" *ngIf="!cipher.isDeleted">
2019-02-21 22:50:37 +01:00
<button 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')">
<i class="fa fa-lg fa-clone" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
</div>
</div>
2018-06-07 16:21:28 +02:00
</div>
<div class="col-6 form-group">
2018-06-07 23:12:11 +02:00
<div class="d-flex">
<label for="loginPassword">{{'password' | i18n}}</label>
<div class="ml-auto d-flex" *ngIf="!cipher.isDeleted && !viewOnly">
<a href="#" class="d-block mr-2 fa-icon-above-input" appStopClick
appA11yTitle="{{'generatePassword' | i18n}}" (click)="generatePassword()"
2020-05-22 09:21:57 +02:00
*ngIf="cipher.viewPassword">
2019-10-11 16:35:24 +02:00
<i class="fa fa-lg fa-fw fa-refresh" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</a>
<a href="#" class="d-block fa-icon-above-input" #checkPasswordBtn appStopClick
2019-10-11 16:35:24 +02:00
appA11yTitle="{{'checkPassword' | i18n}}" (click)="checkPassword()"
2019-02-21 22:50:37 +01:00
[appApiAction]="checkPasswordPromise">
2019-10-11 16:35:24 +02:00
<i class="fa fa-lg fa-fw fa-check-circle" [hidden]="checkPasswordBtn.loading"
aria-hidden="true"></i>
<i class="fa fa-lg fa-fw fa-spinner fa-spin" aria-hidden="true"
2019-02-21 22:50:37 +01:00
[hidden]="!checkPasswordBtn.loading" title="{{'loading' | i18n}}"></i>
2018-06-07 23:12:11 +02:00
</a>
</div>
</div>
2018-06-07 16:21:28 +02:00
<div class="input-group">
2019-02-21 22:50:37 +01:00
<input id="loginPassword" class="form-control text-monospace"
type="{{showPassword ? 'text' : 'password'}}" name="Login.Password"
[(ngModel)]="cipher.login.password" appInputVerbatim autocomplete="new-password"
[disabled]="cipher.isDeleted || !cipher.viewPassword || viewOnly">
<div class="input-group-append">
2019-02-21 22:50:37 +01:00
<button type="button" class="btn btn-outline-secondary"
2019-10-11 16:35:24 +02:00
appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="togglePassword()"
[disabled]="!cipher.viewPassword">
2019-10-11 16:35:24 +02:00
<i class="fa fa-lg" aria-hidden="true"
2019-02-21 22:50:37 +01:00
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
2018-06-07 16:21:28 +02:00
</button>
2019-02-21 22:50:37 +01:00
<button type="button" class="btn btn-outline-secondary"
2019-10-11 16:35:24 +02:00
appA11yTitle="{{'copyPassword' | i18n}}"
(click)="copy(cipher.login.password, 'password', 'Password')"
2020-05-22 09:21:57 +02:00
[disabled]="!cipher.viewPassword">
<i class="fa fa-lg fa-clone" aria-hidden="true"></i>
2018-06-07 16:21:28 +02:00
</button>
2018-06-07 05:23:14 +02:00
</div>
2018-06-06 23:25:57 +02:00
</div>
</div>
2018-06-07 16:21:28 +02:00
</div>
<div class="row">
2018-06-07 16:21:28 +02:00
<div class="col-6 form-group">
<label for="loginTotp">{{'authenticatorKeyTotp' | i18n}}</label>
<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">
2018-06-07 16:21:28 +02:00
</div>
2018-06-20 05:40:51 +02:00
<div class="col-6 form-group totp d-flex align-items-end" [ngClass]="{'low': totpLow}">
<div *ngIf="!cipher.login.totp || !totpCode">
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
<img src="../../images/totp-countdown.png" id="totpImage" title="{{'verificationCodeTotp' | i18n}}"
2019-02-21 22:50:37 +01:00
class="ml-2">
<a href="#" appStopClick class="badge badge-primary ml-3" (click)="premiumRequired()"
*ngIf="!organization && !cipher.organizationId && !canAccessPremium">
2018-07-18 15:21:23 +02:00
{{'premium' | i18n}}
</a>
2019-02-21 22:50:37 +01:00
<a href="#" appStopClick class="badge badge-primary ml-3"
(click)="upgradeOrganization()"
*ngIf="(organization && !organization.useTotp) || (!organization && !canAccessPremium && cipher.organizationId && !cipher.organizationUseTotp)">
2018-07-18 15:21:23 +02:00
{{'upgrade' | i18n}}
</a>
2018-06-20 05:40:51 +02:00
</div>
<div *ngIf="cipher.login.totp && totpCode" class="d-flex align-items-center">
<span class="totp-countdown mr-3 ml-2">
<span class="totp-sec">{{totpSec}}</span>
<svg>
<g>
2019-02-21 22:50:37 +01:00
<circle class="totp-circle inner" r="12.6" cy="16" cx="16"
[ngStyle]="{'stroke-dashoffset.px': totpDash}"></circle>
2018-06-20 05:40:51 +02:00
<circle class="totp-circle outer" r="14" cy="16" cx="16"></circle>
</g>
</svg>
</span>
2019-02-21 22:50:37 +01:00
<span class="totp-code mr-2"
title="{{'verificationCodeTotp' | i18n}}">{{totpCodeFormatted}}</span>
2019-10-11 16:35:24 +02:00
<button type="button" class="btn btn-link"
appA11yTitle="{{'copyVerificationCode' | i18n}}"
2019-02-21 22:50:37 +01:00
(click)="copy(totpCode, 'verificationCodeTotp', 'TOTP')">
<i class="fa fa-clone" aria-hidden="true"></i>
2018-06-20 05:40:51 +02:00
</button>
</div>
</div>
2018-06-07 16:21:28 +02:00
</div>
<ng-container *ngIf="cipher.login.hasUris">
2019-03-28 16:59:53 +01:00
<div class="row" *ngFor="let u of cipher.login.uris; let i = index; trackBy:trackByFunction">
2018-06-07 23:12:11 +02:00
<div class="col-7 form-group">
2018-06-07 16:21:28 +02:00
<label for="loginUri{{i}}">{{'uriPosition' | i18n : (i + 1)}}</label>
2018-06-07 23:12:11 +02:00
<div class="input-group">
2019-02-21 22:50:37 +01:00
<input class="form-control" id="loginUri{{i}}" type="text"
name="Login.Uris[{{i}}].Uri" [(ngModel)]="u.uri"
[disabled]="cipher.isDeleted || viewOnly"
2019-02-21 22:50:37 +01:00
placeholder="{{'ex' | i18n}} https://google.com" appInputVerbatim>
<div class="input-group-append">
2019-02-21 22:50:37 +01:00
<button type="button" class="btn btn-outline-secondary"
2019-10-11 16:35:24 +02:00
appA11yTitle="{{'launch' | i18n}}" (click)="launch(u)"
[disabled]="!u.canLaunch">
2019-10-11 16:35:24 +02:00
<i class="fa fa-lg fa-share" 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="fa fa-lg fa-clone" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
</div>
</div>
2018-06-07 15:05:25 +02:00
</div>
2018-06-09 06:39:14 +02:00
<div class="col-5 form-group">
2018-07-19 19:56:44 +02:00
<div class="d-flex">
<label for="loginUriMatch{{i}}">
{{'matchDetection' | i18n}}
</label>
2019-02-21 22:50:37 +01:00
<a class="ml-auto" href="https://help.bitwarden.com/article/uri-match-detection/"
2019-10-11 16:35:24 +02:00
target="_blank" rel="noopener" appA11yTitle="{{'learnMore' | i18n}}">
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
2018-07-19 19:56:44 +02:00
</a>
</div>
2018-06-09 06:39:14 +02:00
<div class="d-flex">
<select class="form-control overflow-hidden" id="loginUriMatch{{i}}"
name="Login.Uris[{{i}}].Match" [(ngModel)]="u.match"
(change)="loginUriMatchChanged(u)" [disabled]="cipher.isDeleted || viewOnly">
2019-02-21 22:50:37 +01:00
<option *ngFor="let o of uriMatchOptions" [ngValue]="o.value">{{o.name}}
</option>
2018-06-09 06:39:14 +02:00
</select>
2019-02-21 22:50:37 +01:00
<button type="button" class="btn btn-link text-danger ml-2" (click)="removeUri(u)"
appA11yTitle="{{'remove' | i18n}}" *ngIf="!cipher.isDeleted && !viewOnly">
2019-10-11 16:35:24 +02:00
<i class="fa fa-minus-circle fa-lg" aria-hidden="true"></i>
2018-06-09 06:39:14 +02:00
</button>
</div>
2018-06-07 15:05:25 +02:00
</div>
</div>
2018-06-07 16:21:28 +02:00
</ng-container>
<a href="#" appStopClick (click)="addUri()" class="d-inline-block mb-3"
*ngIf="!cipher.isDeleted && !viewOnly">
2019-10-11 17:22:21 +02:00
<i class="fa fa-plus-circle fa-fw" aria-hidden="true"></i> {{'newUri' | i18n}}
2018-06-07 23:12:11 +02:00
</a>
</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>
2019-02-21 22:50:37 +01:00
<input id="cardCardholderName" class="form-control" type="text"
name="Card.CardCardholderName" [(ngModel)]="cipher.card.cardholderName"
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-6 form-group">
<label for="cardBrand">{{'brand' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<select id="cardBrand" class="form-control" name="Card.Brand"
[(ngModel)]="cipher.card.brand" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of cardBrandOptions" [ngValue]="o.value">{{o.name}}</option>
</select>
2018-06-06 23:25:57 +02:00
</div>
2018-06-07 15:05:25 +02:00
</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">
<input id="cardNumber" class="form-control text-monospace"
type="{{showCardNumber ? 'text' : 'password'}}" name="Card.Number"
[(ngModel)]="cipher.card.number" appInputVerbatim autocomplete="new-password"
[disabled]="cipher.isDeleted || viewOnly">
<div class="input-group-append">
<button type="button" class="btn btn-outline-secondary"
appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="toggleCardNumber()">
<i class="fa fa-lg" aria-hidden="true"
[ngClass]="{'fa-eye': !showCardNumber, 'fa-eye-slash': showCardNumber}"></i>
</button>
2019-02-21 22:50:37 +01:00
<button 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')">
<i class="fa fa-lg fa-clone" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
</div>
</div>
2018-06-07 16:21:28 +02:00
</div>
<div class="col form-group">
<label for="cardExpMonth">{{'expirationMonth' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<select id="cardExpMonth" class="form-control" name="Card.ExpMonth"
[(ngModel)]="cipher.card.expMonth" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of cardExpMonthOptions" [ngValue]="o.value">{{o.name}}</option>
</select>
</div>
<div class="col form-group">
<label for="cardExpYear">{{'expirationYear' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="cardExpYear" class="form-control" type="text" name="Card.ExpYear"
[(ngModel)]="cipher.card.expYear" placeholder="{{'ex' | i18n}} 2019"
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
</div>
<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">
2019-02-21 22:50:37 +01:00
<input 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">
<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)="toggleCardCode()">
2019-10-11 16:35:24 +02:00
<i class="fa fa-lg" aria-hidden="true"
2019-02-21 22:50:37 +01:00
[ngClass]="{'fa-eye': !showCardCode, 'fa-eye-slash': showCardCode}"></i>
</button>
2019-02-21 22:50:37 +01:00
<button 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')">
<i class="fa fa-lg fa-clone" aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
</div>
</div>
2018-06-07 16:21:28 +02:00
</div>
2018-06-07 15:05:25 +02:00
</div>
2018-06-07 23:12:11 +02:00
</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>
2019-02-21 22:50:37 +01:00
<select id="idTitle" class="form-control" name="Identity.Title"
[(ngModel)]="cipher.identity.title" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
<option *ngFor="let o of identityTitleOptions" [ngValue]="o.value">{{o.name}}</option>
2018-06-07 15:05:25 +02:00
</select>
2018-06-06 23:25:57 +02:00
</div>
2018-06-07 16:21:28 +02:00
</div>
<div class="row">
<div class="col-4 form-group">
<label for="idFirstName">{{'firstName' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idFirstName" class="form-control" type="text" name="Identity.FirstName"
[(ngModel)]="cipher.identity.firstName" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-4 form-group">
<label for="idMiddleName">{{'middleName' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idMiddleName" class="form-control" type="text" name="Identity.MiddleName"
[(ngModel)]="cipher.identity.middleName" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-4 form-group">
<label for="idLastName">{{'lastName' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idLastName" class="form-control" type="text" name="Identity.LastName"
[(ngModel)]="cipher.identity.lastName" [disabled]="cipher.isDeleted || viewOnly">
2018-06-06 23:25:57 +02:00
</div>
2018-06-07 15:05:25 +02:00
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-4 form-group">
<label for="idUsername">{{'username' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idUsername" class="form-control" type="text" name="Identity.Username"
[(ngModel)]="cipher.identity.username" appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-4 form-group">
<label for="idCompany">{{'company' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idCompany" class="form-control" type="text" name="Identity.Company"
[(ngModel)]="cipher.identity.company" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
2018-06-07 15:05:25 +02:00
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-4 form-group">
<label for="idSsn">{{'ssn' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idSsn" class="form-control" type="text" name="Identity.SSN"
[(ngModel)]="cipher.identity.ssn" appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-4 form-group">
<label for="idPassportNumber">{{'passportNumber' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idPassportNumber" class="form-control" type="text" name="Identity.PassportNumber"
[(ngModel)]="cipher.identity.passportNumber" appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-4 form-group">
<label for="idLicenseNumber">{{'licenseNumber' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idLicenseNumber" class="form-control" type="text" name="Identity.LicenseNumber"
[(ngModel)]="cipher.identity.licenseNumber" appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 15:05:25 +02: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>
2019-02-21 22:50:37 +01:00
<input id="idEmail" class="form-control" type="text" name="Identity.Email"
[(ngModel)]="cipher.identity.email" appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-6 form-group">
<label for="idPhone">{{'phone' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idPhone" class="form-control" type="text" name="Identity.Phone"
[(ngModel)]="cipher.identity.phone" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
2018-06-07 15:05:25 +02:00
</div>
2018-06-07 16:21:28 +02:00
<div class="row">
<div class="col-6 form-group">
<label for="idAddress1">{{'address1' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idAddress1" class="form-control" type="text" name="Identity.Address1"
[(ngModel)]="cipher.identity.address1" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-6 form-group">
<label for="idAddress2">{{'address2' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idAddress2" class="form-control" type="text" name="Identity.Address2"
[(ngModel)]="cipher.identity.address2" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
</div>
<div class="row">
<div class="col-6 form-group">
<label for="idAddress3">{{'address3' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idAddress3" class="form-control" type="text" name="Identity.Address3"
[(ngModel)]="cipher.identity.address3" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-6 form-group">
<label for="idCity">{{'cityTown' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idCity" class="form-control" type="text" name="Identity.City"
[(ngModel)]="cipher.identity.city" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
</div>
<div class="row">
<div class="col-6 form-group">
<label for="idState">{{'stateProvince' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idState" class="form-control" type="text" name="Identity.State"
[(ngModel)]="cipher.identity.state" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
<div class="col-6 form-group">
<label for="idPostalCode">{{'zipPostalCode' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idPostalCode" class="form-control" type="text" name="Identity.PostalCode"
[(ngModel)]="cipher.identity.postalCode" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
</div>
<div class="row">
<div class="col-6 form-group">
<label for="idCountry">{{'country' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<input id="idCountry" class="form-control" type="text" name="Identity.Country"
[(ngModel)]="cipher.identity.country" [disabled]="cipher.isDeleted || viewOnly">
2018-06-07 16:21:28 +02:00
</div>
</div>
2018-06-07 23:12:11 +02:00
</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" rows="6" [(ngModel)]="cipher.notes"
[disabled]="cipher.isDeleted || viewOnly" class="form-control"></textarea>
2018-06-07 16:21:28 +02:00
</div>
<app-vault-add-edit-custom-fields [cipher]="cipher" [viewOnly]="viewOnly" [copy]="copy.bind(this)">
</app-vault-add-edit-custom-fields>
<ng-container *ngIf="allowOwnershipAssignment()">
<h3 class="mt-4">{{'ownership' | i18n}}</h3>
<div class="row">
<div class="col-5">
<label for="organizationId">{{'whoOwnsThisItem' | i18n}}</label>
2019-02-21 22:50:37 +01:00
<select id="organizationId" class="form-control" name="OrganizationId"
[(ngModel)]="cipher.organizationId" (change)="organizationChanged()"
[disabled]="cipher.isDeleted || viewOnly">
<option *ngFor="let o of ownershipOptions" [ngValue]="o.value">{{o.name}}</option>
</select>
</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}}
</div>
<ng-container *ngIf="collections && collections.length">
<div class="form-check" *ngFor="let c of collections; let i = index">
2019-02-21 22:50:37 +01:00
<input class="form-check-input" type="checkbox" [(ngModel)]="c.checked"
id="collection-{{i}}" name="Collection[{{i}}].Checked"
[disabled]="cipher.isDeleted || viewOnly">
<label class="form-check-label" for="collection-{{i}}">{{c.name}}</label>
</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">
2018-07-28 05:38:12 +02:00
<div>
<b class="font-weight-semibold">{{'dateUpdated' | i18n}}:</b>
{{cipher.revisionDate | date:'medium'}}
</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'}}
2018-07-28 05:38:12 +02:00
</div>
2018-07-31 04:02:01 +02:00
<div *ngIf="hasPasswordHistory">
2018-07-30 14:48:48 +02:00
<b class="font-weight-semibold">{{'passwordHistory' | i18n}}:</b>
<a href="#" appStopClick (click)="viewHistory()" title="{{'view' | i18n}}">
{{cipher.passwordHistory.length}}
</a>
</div>
<div class="ml-3" *ngIf="viewingPasswordHistory">
<div *ngFor="let ph of cipher.passwordHistory">
{{ph.lastUsedDate | date:'short'}} -
2020-12-16 21:47:37 +01:00
<span class="password-wrapper text-monospace ml-2">{{ph.password}}</span>
2018-07-30 14:48:48 +02:00
</div>
</div>
2018-07-28 05:38:12 +02:00
</div>
</ng-container>
<ng-container>
<h3 class="mt-4">{{'options' | i18n}}</h3>
<div class="form-check">
<input class="form-check-input" type="checkbox" [ngModel]="reprompt" (change)="repromptChanged()"
id="passwordPrompt" name="passwordPrompt" [disabled]="cipher.isDeleted || viewOnly">
2021-06-21 20:52:34 +02:00
<label class="form-check-label" for="passwordPrompt">{{'passwordPrompt' | i18n}}</label>
<a target="_blank" rel="noopener" appA11yTitle="{{'learnMore' | i18n}}"
href="https://bitwarden.com/help/article/managing-items/#protect-individual-items">
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
</a>
</div>
</ng-container>
2018-06-07 15:05:25 +02:00
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading" *ngIf="!viewOnly">
2019-10-11 16:35:24 +02:00
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
<span>{{(cipher?.isDeleted ? 'restore' : 'save') | i18n}}</span>
2018-06-07 15:05:25 +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 15:05:25 +02:00
</button>
<div class="ml-auto" *ngIf="cipher && !viewOnly">
<button *ngIf="!organization && !cipher.isDeleted" type="button" (click)="toggleFavorite()"
class="btn btn-link" appA11yTitle="{{(cipher.favorite ? 'unfavorite' : 'favorite') | i18n}}">
2019-10-11 16:35:24 +02:00
<i class="fa fa-lg" [ngClass]="{'fa-star': cipher.favorite, 'fa-star-o': !cipher.favorite}"
aria-hidden="true"></i>
2018-06-07 23:12:11 +02:00
</button>
2019-02-21 22:50:37 +01:00
<button #deleteBtn type="button" (click)="delete()" class="btn btn-outline-danger"
appA11yTitle="{{(cipher.isDeleted ? 'permanentlyDelete' : 'delete') | i18n}}"
*ngIf="editMode && !cloneMode" [disabled]="deleteBtn.loading" [appApiAction]="deletePromise">
2019-10-11 16:35:24 +02:00
<i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading" aria-hidden="true"></i>
2019-02-21 22:50:37 +01:00
<i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"
2019-10-11 16:35:24 +02:00
title="{{'loading' | i18n}}" aria-hidden="true"></i>
2018-06-07 05:23:14 +02:00
</button>
2018-06-06 23:25:57 +02:00
</div>
</div>
2018-06-07 05:23:14 +02:00
</form>
2018-06-06 23:25:57 +02:00
</div>
</div>