bitwarden-desktop/src/app/vault/add-edit.component.html

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

609 lines
22 KiB
HTML
Raw Normal View History

<form #form="ngForm" (ngSubmit)="submit()" [appApiAction]="formPromise">
2018-01-31 18:52:12 +01:00
<div class="content">
<div class="inner-content" *ngIf="cipher">
<div class="box">
<app-callout type="info" *ngIf="allowOwnershipOptions() && !allowPersonal">
{{ "personalOwnershipPolicyInEffect" | i18n }}
</app-callout>
2018-01-31 18:52:12 +01:00
<div class="box-header">
{{ title }}
2018-01-25 22:15:47 +01:00
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content">
<div class="box-content-row" *ngIf="!editMode" appBoxRow>
<label for="type">{{ "type" | i18n }}</label>
<select id="type" name="Type" [(ngModel)]="cipher.type">
<option *ngFor="let o of typeOptions" [ngValue]="o.value">{{ o.name }}</option>
</select>
2018-01-24 23:41:57 +01:00
</div>
2018-01-30 20:33:06 +01:00
<div class="box-content-row" appBoxRow>
2018-01-31 18:52:12 +01:00
<label for="name">{{ "name" | i18n }}</label>
<input
id="name"
type="text"
name="Name"
[(ngModel)]="cipher.name"
[appAutofocus]="!editMode"
/>
2018-01-24 23:41:57 +01:00
</div>
2018-01-31 18:52:12 +01:00
<!-- Login -->
<div *ngIf="cipher.type === cipherType.Login">
<div class="box-content-row" appBoxRow>
<label for="loginUsername">{{ "username" | i18n }}</label>
<input
id="loginUsername"
type="text"
name="Login.Username"
[(ngModel)]="cipher.login.username"
appInputVerbatim
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row box-content-row-flex" appBoxRow>
<div class="row-main">
<label for="loginPassword">{{ "password" | i18n }}</label>
<input
id="loginPassword"
class="monospaced"
2019-02-21 22:53:32 +01:00
type="{{ showPassword ? 'text' : 'password' }}"
name="Login.Password"
[(ngModel)]="cipher.login.password"
[disabled]="!cipher.viewPassword"
appInputVerbatim
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="action-buttons" *ngIf="cipher.viewPassword">
<button
type="button"
#checkPasswordBtn
class="row-btn btn"
appBlurClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'checkPassword' | i18n }}"
(click)="checkPassword()"
2019-02-21 22:53:32 +01:00
[appApiAction]="checkPasswordPromise"
[disabled]="checkPasswordBtn.loading"
>
2019-04-02 04:56:28 +02:00
<i
class="bwi bwi-lg bwi-check-circle"
2019-04-02 04:56:28 +02:00
[hidden]="checkPasswordBtn.loading"
aria-hidden="true"
></i>
<i
class="bwi bwi-lg bwi-spinner bwi-spin"
2019-04-02 04:56:28 +02:00
[hidden]="!checkPasswordBtn.loading"
aria-hidden="true"
2019-02-21 22:53:32 +01:00
></i>
2018-01-31 18:52:12 +01:00
</button>
2019-04-03 06:04:42 +02:00
<a
class="row-btn"
href="#"
appStopClick
appBlurClick
role="button"
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="togglePassword()"
2019-04-02 04:56:28 +02:00
>
<i
class="bwi bwi-lg"
2019-04-02 04:56:28 +02:00
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }"
2021-12-20 15:47:17 +01:00
></i>
</a>
2021-12-20 15:47:17 +01:00
<a
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
appStopClick
appBlurClick
role="button"
appA11yTitle="{{ 'generatePassword' | i18n }}"
2018-01-31 18:52:12 +01:00
(click)="generatePassword()"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-generate" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
2018-01-31 18:52:12 +01:00
</div>
2021-12-20 15:47:17 +01:00
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="loginTotp">{{ "authenticatorKeyTotp" | i18n }}</label>
<input
id="loginTotp"
type="{{ cipher.viewPassword ? 'text' : 'password' }}"
name="Login.Totp"
class="monospaced"
[(ngModel)]="cipher.login.totp"
[disabled]="!cipher.viewPassword"
appInputVerbatim
/>
</div>
</div>
<!-- Card -->
<div *ngIf="cipher.type === cipherType.Card">
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="cardCardholderName">{{ "cardholderName" | i18n }}</label>
<input
id="cardCardholderName"
type="text"
name="Card.CardCardholderName"
[(ngModel)]="cipher.card.cardholderName"
/>
</div>
2018-06-18 23:29:45 +02:00
<div class="box-content-row box-content-row-flex" appBoxRow>
<div class="row-main">
<label for="cardNumber">{{ "number" | i18n }}</label>
2019-02-21 22:53:32 +01:00
<input
id="cardNumber"
class="monospaced"
type="{{ showCardNumber ? 'text' : 'password' }}"
name="Card.Number"
[(ngModel)]="cipher.card.number"
appInputVerbatim
/>
2018-06-18 23:29:45 +02:00
</div>
<div class="action-buttons">
2019-04-03 06:04:42 +02:00
<a
class="row-btn"
href="#"
appStopClick
appBlurClick
role="button"
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="toggleCardNumber()"
>
2019-04-02 04:56:28 +02:00
<i
class="bwi bwi-lg"
2019-04-02 04:56:28 +02:00
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showCardNumber, 'bwi-eye-slash': showCardNumber }"
2019-02-21 22:53:32 +01:00
></i>
2018-06-18 23:29:45 +02:00
</a>
2021-12-20 15:47:17 +01:00
</div>
2018-06-18 23:29:45 +02:00
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="cardBrand">{{ "brand" | i18n }}</label>
<select id="cardBrand" name="Card.Brand" [(ngModel)]="cipher.card.brand">
<option *ngFor="let o of cardBrandOptions" [ngValue]="o.value">{{ o.name }}</option>
</select>
</div>
<div class="box-content-row" appBoxRow>
<label for="cardExpMonth">{{ "expirationMonth" | i18n }}</label>
2019-02-21 22:53:32 +01:00
<select id="cardExpMonth" name="Card.ExpMonth" [(ngModel)]="cipher.card.expMonth">
<option *ngFor="let o of cardExpMonthOptions" [ngValue]="o.value">
2021-12-20 15:47:17 +01:00
{{ o.name }}
2018-03-02 05:45:12 +01:00
</option>
</select>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row" appBoxRow>
<label for="cardExpYear">{{ "expirationYear" | i18n }}</label>
<input
id="cardExpYear"
type="text"
name="Card.ExpYear"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.card.expYear"
placeholder="{{ 'ex' | i18n }} {{ currentDate | date: 'yyyy' }}"
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row box-content-row-flex" appBoxRow>
<div class="row-main">
<label for="cardCode">{{ "securityCode" | i18n }}</label>
<input
id="cardCode"
class="monospaced"
type="{{ showCardCode ? 'text' : 'password' }}"
name="Card.Code"
[(ngModel)]="cipher.card.code"
appInputVerbatim
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
2018-01-31 18:52:12 +01:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-02 04:43:42 +02:00
appStopClick
2018-01-31 18:52:12 +01:00
appBlurClick
role="button"
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="toggleCardCode()"
2021-12-20 15:47:17 +01:00
>
2018-01-31 18:52:12 +01:00
<i
class="bwi bwi-lg"
2018-01-31 18:52:12 +01:00
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showCardCode, 'bwi-eye-slash': showCardCode }"
2021-12-20 15:47:17 +01:00
></i>
</a>
</div>
</div>
</div>
2018-01-31 18:52:12 +01:00
<!-- Identity -->
2019-02-21 22:53:32 +01:00
<div *ngIf="cipher.type === cipherType.Identity">
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idTitle">{{ "title" | i18n }}</label>
<select id="idTitle" name="Identity.Title" [(ngModel)]="cipher.identity.title">
<option *ngFor="let o of identityTitleOptions" [ngValue]="o.value">
2021-12-20 15:47:17 +01:00
{{ o.name }}
2018-03-02 05:45:12 +01:00
</option>
</select>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row" appBoxRow>
<label for="idFirstName">{{ "firstName" | i18n }}</label>
<input
id="idFirstName"
type="text"
name="Identity.FirstName"
[(ngModel)]="cipher.identity.firstName"
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row" appBoxRow>
<label for="idMiddleName">{{ "middleName" | i18n }}</label>
<input
id="idMiddleName"
type="text"
name="Identity.MiddleName"
[(ngModel)]="cipher.identity.middleName"
/>
</div>
<div class="box-content-row" appBoxRow>
<label for="idLastName">{{ "lastName" | i18n }}</label>
<input
id="idLastName"
type="text"
name="Identity.LastName"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.lastName"
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row" appBoxRow>
<label for="idUsername">{{ "username" | i18n }}</label>
<input
id="idUsername"
type="text"
name="Identity.Username"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.username"
appInputVerbatim
2019-02-21 22:53:32 +01:00
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row" appBoxRow>
<label for="idCompany">{{ "company" | i18n }}</label>
<input
id="idCompany"
type="text"
name="Identity.Company"
[(ngModel)]="cipher.identity.company"
/>
</div>
<div class="box-content-row" appBoxRow>
<label for="idSsn">{{ "ssn" | i18n }}</label>
<input
id="idSsn"
type="text"
name="Identity.SSN"
[(ngModel)]="cipher.identity.ssn"
appInputVerbatim
2019-02-21 22:53:32 +01:00
/>
2018-01-31 18:52:12 +01:00
</div>
<div class="box-content-row" appBoxRow>
<label for="idPassportNumber">{{ "passportNumber" | i18n }}</label>
<input
id="idPassportNumber"
type="text"
name="Identity.PassportNumber"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.passportNumber"
appInputVerbatim
2018-01-25 22:15:47 +01:00
/>
2018-01-31 18:52:12 +01:00
</div>
2018-03-02 05:45:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idLicenseNumber">{{ "licenseNumber" | i18n }}</label>
<input
id="idLicenseNumber"
type="text"
name="Identity.LicenseNumber"
2018-03-02 14:15:55 +01:00
[(ngModel)]="cipher.identity.licenseNumber"
2019-04-03 06:04:42 +02:00
appInputVerbatim
2018-03-02 05:45:12 +01:00
/>
</div>
2018-01-30 20:33:06 +01:00
<div class="box-content-row" appBoxRow>
2018-01-31 18:52:12 +01:00
<label for="idEmail">{{ "email" | i18n }}</label>
<input
id="idEmail"
type="text"
name="Identity.Email"
[(ngModel)]="cipher.identity.email"
appInputVerbatim
2018-10-23 21:50:21 +02:00
/>
2018-01-24 23:41:57 +01:00
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idPhone">{{ "phone" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<input
2018-01-31 18:52:12 +01:00
id="idPhone"
type="text"
name="Identity.Phone"
[(ngModel)]="cipher.identity.phone"
2018-01-26 04:54:09 +01:00
/>
</div>
2018-10-23 22:43:55 +02:00
<div class="box-content-row" appBoxRow>
<label for="idAddress1">{{ "address1" | i18n }}</label>
<input
id="idAddress1"
type="text"
name="Identity.Address1"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.address1"
2018-10-23 22:43:55 +02:00
/>
</div>
2019-02-21 22:53:32 +01:00
<div class="box-content-row" appBoxRow>
2018-10-23 22:43:55 +02:00
<label for="idAddress2">{{ "address2" | i18n }}</label>
<input
id="idAddress2"
type="text"
2018-01-31 18:52:12 +01:00
name="Identity.Address2"
2018-10-23 22:43:55 +02:00
[(ngModel)]="cipher.identity.address2"
/>
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idAddress3">{{ "address3" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<input
2018-01-31 18:52:12 +01:00
id="idAddress3"
type="text"
name="Identity.Address3"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.address3"
2021-12-20 15:47:17 +01:00
/>
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idCity">{{ "cityTown" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<input
id="idCity"
2018-01-31 18:52:12 +01:00
type="text"
name="Identity.City"
[(ngModel)]="cipher.identity.city"
2021-12-20 15:47:17 +01:00
/>
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idState">{{ "stateProvince" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<input
2018-01-31 18:52:12 +01:00
id="idState"
type="text"
name="Identity.State"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.state"
2021-12-20 15:47:17 +01:00
/>
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idPostalCode">{{ "zipPostalCode" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<input
2018-01-31 18:52:12 +01:00
id="idPostalCode"
type="text"
name="Identity.PostalCode"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.postalCode"
2021-12-20 15:47:17 +01:00
/>
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="idCountry">{{ "country" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<input
id="idCountry"
2018-01-31 18:52:12 +01:00
type="text"
name="Identity.Country"
2019-02-21 22:53:32 +01:00
[(ngModel)]="cipher.identity.country"
2021-12-20 15:47:17 +01:00
/>
</div>
</div>
2018-01-26 04:54:09 +01:00
</div>
2018-01-24 23:41:57 +01:00
</div>
2018-01-31 18:52:12 +01:00
<div class="box" *ngIf="cipher.type === cipherType.Login">
<div class="box-content">
2019-04-02 04:43:42 +02:00
<ng-container *ngIf="cipher.login.hasUris">
<div
class="box-content-row box-content-row-multi"
appBoxRow
*ngFor="let u of cipher.login.uris; let i = index; trackBy: trackByFunction"
2021-12-20 15:47:17 +01:00
>
2019-04-02 04:43:42 +02:00
<a href="#" appStopClick (click)="removeUri(u)" appA11yTitle="{{ 'remove' | i18n }}">
<i class="bwi bwi-minus-circle bwi-lg" aria-hidden="true" role="button"></i>
2021-12-20 15:47:17 +01:00
</a>
2019-04-02 04:56:28 +02:00
<div class="row-main">
<label for="loginUri{{ i }}">{{ "uriPosition" | i18n: i + 1 }}</label>
2021-12-20 15:47:17 +01:00
<input
2019-04-02 04:56:28 +02:00
id="loginUri{{ i }}"
2018-01-31 18:52:12 +01:00
type="text"
2018-03-02 14:15:55 +01:00
name="Login.Uris[{{ i }}].Uri"
2019-04-02 04:56:28 +02:00
[(ngModel)]="u.uri"
placeholder="{{ 'ex' | i18n }} https://google.com"
2019-04-02 04:56:28 +02:00
appInputVerbatim
2021-12-20 15:47:17 +01:00
/>
2019-04-02 04:56:28 +02:00
<label for="loginUriMatch{{ i }}" class="sr-only">
2018-03-12 17:28:41 +01:00
{{ "matchDetection" | i18n }} {{ i + 1 }}
2021-12-20 15:47:17 +01:00
</label>
<select
2019-04-02 04:56:28 +02:00
id="loginUriMatch{{ i }}"
2018-03-02 14:15:55 +01:00
name="Login.Uris[{{ i }}].Match"
2019-04-02 04:56:28 +02:00
[(ngModel)]="u.match"
[hidden]="u.showOptions === false || (u.showOptions == null && u.match == null)"
2019-02-21 22:53:32 +01:00
(change)="loginUriMatchChanged(u)"
2021-12-20 15:47:17 +01:00
>
2018-03-02 05:45:12 +01:00
<option *ngFor="let o of uriMatchOptions" [ngValue]="o.value">
2021-12-20 15:47:17 +01:00
{{ o.name }}
2018-10-23 22:43:55 +02:00
</option>
</select>
2019-04-02 04:56:28 +02:00
</div>
2018-03-02 14:15:55 +01:00
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
2019-04-03 06:04:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2018-10-23 21:50:21 +02:00
appStopClick
2019-04-02 04:43:42 +02:00
appBlurClick
role="button"
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'toggleOptions' | i18n }}"
(click)="toggleUriOptions(u)"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-cog-f" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
</div>
</div>
2018-03-02 05:45:12 +01:00
</ng-container>
2021-12-20 15:47:17 +01:00
<a
href="#"
2018-10-23 21:50:21 +02:00
appStopClick
2019-04-02 04:43:42 +02:00
appBlurClick
2019-04-02 04:56:28 +02:00
(click)="addUri()"
class="box-content-row"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-plus-circle bwi-fw bwi-lg" aria-hidden="true"></i>
{{ "newUri" | i18n }}
2018-01-31 18:52:12 +01:00
</a>
2021-12-20 15:47:17 +01:00
</div>
</div>
2019-04-02 04:43:42 +02:00
<div class="box">
2018-01-31 18:52:12 +01:00
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="folder">{{ "folder" | i18n }}</label>
<select id="folder" name="FolderId" [(ngModel)]="cipher.folderId">
<option *ngFor="let f of folders" [ngValue]="f.id">{{ f.name }}</option>
2018-10-23 22:43:55 +02:00
</select>
2021-12-20 15:47:17 +01:00
</div>
2018-01-31 18:52:12 +01:00
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="favorite">{{ "favorite" | i18n }}</label>
<input id="favorite" type="checkbox" name="Favorite" [(ngModel)]="cipher.favorite" />
2021-12-20 15:47:17 +01:00
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow *ngIf="canUseReprompt">
2021-06-21 20:56:37 +02:00
<label for="passwordPrompt"
>{{ "passwordPrompt" | i18n }}
<a href="#" appA11yTitle="{{ 'learnMore' | i18n }}" (click)="openHelpReprompt()">
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
</label>
<input
id="passwordPrompt"
type="checkbox"
name="PasswordPrompt"
[ngModel]="reprompt"
(change)="repromptChanged()"
2021-12-20 15:47:17 +01:00
/>
</div>
<a
2018-10-23 21:50:21 +02:00
class="box-content-row box-content-row-flex text-default"
2021-12-20 15:47:17 +01:00
href="#"
appStopClick
appBlurClick
(click)="attachments()"
*ngIf="editMode && !cloneMode"
role="button"
2021-12-20 15:47:17 +01:00
>
2018-01-31 18:52:12 +01:00
<div class="row-main">{{ "attachments" | i18n }}</div>
<i class="bwi bwi-angle-right row-sub-icon" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
<a
2018-10-23 21:50:21 +02:00
class="box-content-row box-content-row-flex text-default"
2021-12-20 15:47:17 +01:00
href="#"
2018-10-23 21:50:21 +02:00
appStopClick
2019-04-02 04:43:42 +02:00
appBlurClick
(click)="editCollections()"
*ngIf="editMode && !cloneMode && cipher.organizationId"
role="button"
2021-12-20 15:47:17 +01:00
>
<div class="row-main">{{ "collections" | i18n }}</div>
<i class="bwi bwi-angle-right row-sub-icon" aria-hidden="true"></i>
2018-01-31 18:52:12 +01:00
</a>
</div>
2021-12-20 15:47:17 +01:00
</div>
<div class="box">
2018-10-23 22:43:55 +02:00
<div class="box-header">
2018-01-31 18:52:12 +01:00
<label for="notes">{{ "notes" | i18n }}</label>
2021-12-20 15:47:17 +01:00
</div>
2018-10-23 22:43:55 +02:00
<div class="box-content">
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<textarea id="notes" name="Notes" rows="6" [(ngModel)]="cipher.notes"></textarea>
2021-12-20 15:47:17 +01:00
</div>
</div>
</div>
<app-vault-add-edit-custom-fields
[cipher]="cipher"
[thisCipherType]="cipher.type"
[editMode]="editMode"
2021-12-20 15:47:17 +01:00
>
</app-vault-add-edit-custom-fields>
<div class="box" *ngIf="allowOwnershipOptions()">
2018-10-23 22:43:55 +02:00
<div class="box-header">
{{ "ownership" | i18n }}
2021-12-20 15:47:17 +01:00
</div>
2018-10-23 22:43:55 +02:00
<div class="box-content">
2018-01-31 18:52:12 +01:00
<div class="box-content-row" appBoxRow>
<label for="organizationId">{{ "whoOwnsThisItem" | i18n }}</label>
2021-12-20 15:47:17 +01:00
<select
id="organizationId"
2018-10-23 22:43:55 +02:00
class="form-control"
name="OrganizationId"
[(ngModel)]="cipher.organizationId"
2019-02-21 22:53:32 +01:00
(change)="organizationChanged()"
2021-12-20 15:47:17 +01:00
>
2018-10-23 22:43:55 +02:00
<option *ngFor="let o of ownershipOptions" [ngValue]="o.value">{{ o.name }}</option>
</select>
2021-12-20 15:47:17 +01:00
</div>
</div>
</div>
<div class="box" *ngIf="(!editMode || cloneMode) && cipher.organizationId">
2018-10-23 22:43:55 +02:00
<div class="box-header">
{{ "collections" | i18n }}
2021-12-20 15:47:17 +01:00
</div>
2018-10-23 22:43:55 +02:00
<div class="box-content" *ngIf="!collections || !collections.length">
{{ "noCollectionsInList" | i18n }}
2021-12-20 15:47:17 +01:00
</div>
2018-10-23 22:43:55 +02:00
<div class="box-content" *ngIf="collections && collections.length">
2021-12-20 15:47:17 +01:00
<div
class="box-content-row box-content-row-checkbox"
2019-02-21 22:53:32 +01:00
*ngFor="let c of collections; let i = index"
appBoxRow
2021-12-20 15:47:17 +01:00
>
2018-01-31 18:52:12 +01:00
<label for="collection_{{ i }}">{{ c.name }}</label>
2021-12-20 15:47:17 +01:00
<input
2018-10-23 22:43:55 +02:00
id="collection_{{ i }}"
type="checkbox"
2018-01-31 18:52:12 +01:00
[(ngModel)]="c.checked"
2019-02-21 22:53:32 +01:00
name="Collection[{{ i }}].Checked"
2021-12-20 15:47:17 +01:00
/>
</div>
</div>
</div>
</div>
</div>
2018-10-23 22:43:55 +02:00
<div class="footer">
2021-12-20 15:47:17 +01:00
<button
2019-04-02 04:43:42 +02:00
appBlurClick
type="submit"
2018-03-02 05:45:12 +01:00
class="primary"
appA11yTitle="{{ 'save' | i18n }}"
[disabled]="form.loading"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-save-changes bwi-lg bwi-fw" [hidden]="form.loading" aria-hidden="true"></i>
<i
class="bwi bwi-spinner bwi-spin bwi-lg bwi-fw"
[hidden]="!form.loading"
aria-hidden="true"
></i>
2018-10-23 21:50:21 +02:00
</button>
2019-04-02 04:43:42 +02:00
<button appBlurClick type="button" (click)="cancel()">
2018-01-31 18:52:12 +01:00
{{ "cancel" | i18n }}
2018-10-23 21:50:21 +02:00
</button>
2018-10-23 22:43:55 +02:00
<div class="right">
2021-12-20 15:47:17 +01:00
<button
2019-04-02 04:43:42 +02:00
appBlurClick
type="button"
2021-06-21 20:56:37 +02:00
(click)="share()"
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'moveToOrganization' | i18n }}"
*ngIf="editMode && cipher && !cipher.organizationId && !cloneMode"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-arrow-circle-right bwi-lg bwi-fw" aria-hidden="true"></i>
2018-10-23 21:50:21 +02:00
</button>
2021-12-20 15:47:17 +01:00
<button
2019-04-02 04:43:42 +02:00
#deleteBtn
appBlurClick
type="button"
(click)="delete()"
class="danger"
appA11yTitle="{{ 'delete' | i18n }}"
*ngIf="editMode && !cloneMode"
[disabled]="deleteBtn.loading"
2019-04-02 04:43:42 +02:00
[appApiAction]="deletePromise"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-trash bwi-lg bwi-fw" [hidden]="deleteBtn.loading" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
<i
class="bwi bwi-spinner bwi-spin bwi-lg bwi-fw"
2019-04-02 04:56:28 +02:00
[hidden]="!deleteBtn.loading"
aria-hidden="true"
2021-12-20 15:47:17 +01:00
></i>
2018-10-23 21:50:21 +02:00
</button>
2018-01-29 22:13:37 +01:00
</div>
2021-12-20 15:47:17 +01:00
</div>
</form>