Files
threshold-ui/ui/admin/app/components/form/field/secret-input/index.hbs
T
Dharini Jeeva 7d6f3df140 chore: update HDS to 3.0.2 (#1970)
* chore: 🤖 update to hds 3.0.2
2023-10-30 12:56:38 -07:00

44 lines
987 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
<div class='secret-input'>
{{#if (or this.isDisabled this.isActionable)}}
<span class='overlay'></span>
{{/if}}
<Hds::Form::TextInput::Field
@isRequired={{@isRequired}}
@isInvalid={{@isInvalid}}
@value={{@value}}
@type={{(or @type 'password')}}
name={{@name}}
disabled={{or @isDisabled (not this.isEditing)}}
@hasVisibilityToggle={{false}}
...attributes
as |F|
>
{{yield F}}
</Hds::Form::TextInput::Field>
{{#if this.isDisabled}}
<Hds::Button
@text={{t 'actions.edit'}}
@icon='edit'
disabled={{@isDisabled}}
/>
{{else if this.isActionable}}
<Hds::Button
@text={{t 'actions.edit'}}
@icon='edit'
@color='secondary'
{{on 'click' this.enableEdit}}
/>
{{else}}
<Hds::Button
@text={{t 'actions.cancel'}}
@color='secondary'
{{on 'click' this.cancelEdit}}
/>
{{/if}}
</div>