mirror of
https://github.com/bitwarden/browser
synced 2025-12-29 06:33:40 +00:00
* add option to include a label for copy success message * add label text to copy success messages for all cipher types
86 lines
2.3 KiB
HTML
86 lines
2.3 KiB
HTML
<bit-section>
|
|
<bit-section-header>
|
|
<h2 bitTypography="h6">{{ setSectionTitle }}</h2>
|
|
</bit-section-header>
|
|
<bit-card>
|
|
<bit-form-field [disableMargin]="!card.number && !card.expiration && !card.code">
|
|
<bit-label>{{ "cardholderName" | i18n }}</bit-label>
|
|
<input
|
|
readonly
|
|
bitInput
|
|
type="text"
|
|
[value]="card.cardholderName"
|
|
aria-readonly="true"
|
|
data-testid="cardholder-name"
|
|
/>
|
|
</bit-form-field>
|
|
<bit-form-field *ngIf="card.number" [disableMargin]="!card.expiration && !card.code">
|
|
<bit-label>{{ "number" | i18n }}</bit-label>
|
|
<input
|
|
readonly
|
|
bitInput
|
|
type="password"
|
|
[value]="card.number"
|
|
aria-readonly="true"
|
|
data-testid="cardholder-number"
|
|
/>
|
|
<button
|
|
bitSuffix
|
|
type="button"
|
|
bitIconButton
|
|
bitPasswordInputToggle
|
|
data-testid="toggle-number"
|
|
></button>
|
|
<button
|
|
bitIconButton="bwi-clone"
|
|
bitSuffix
|
|
type="button"
|
|
[appCopyClick]="card.number"
|
|
showToast
|
|
[valueLabel]="'number' | i18n"
|
|
[appA11yTitle]="'copyValue' | i18n"
|
|
data-testid="copy-number"
|
|
></button>
|
|
</bit-form-field>
|
|
<bit-form-field *ngIf="card.expiration" [disableMargin]="!card.code">
|
|
<bit-label>{{ "expiration" | i18n }}</bit-label>
|
|
<input
|
|
readonly
|
|
bitInput
|
|
type="text"
|
|
[value]="card.expiration"
|
|
aria-readonly="true"
|
|
data-testid="cardholder-expiration"
|
|
/>
|
|
</bit-form-field>
|
|
<bit-form-field *ngIf="card.code" disableMargin>
|
|
<bit-label>{{ "securityCode" | i18n }}</bit-label>
|
|
<input
|
|
readonly
|
|
bitInput
|
|
type="password"
|
|
[value]="card.code"
|
|
aria-readonly="true"
|
|
data-testid="cardholder-code"
|
|
/>
|
|
<button
|
|
bitSuffix
|
|
type="button"
|
|
bitIconButton
|
|
bitPasswordInputToggle
|
|
data-testid="toggle-code"
|
|
></button>
|
|
<button
|
|
bitIconButton="bwi-clone"
|
|
bitSuffix
|
|
type="button"
|
|
[appCopyClick]="card.code"
|
|
showToast
|
|
[valueLabel]="'securityCode' | i18n"
|
|
[appA11yTitle]="'copyValue' | i18n"
|
|
data-testid="copy-code"
|
|
></button>
|
|
</bit-form-field>
|
|
</bit-card>
|
|
</bit-section>
|