Files
threshold-ui/ui/admin/app/components/form/field/secret-input/index.hbs
T
Randall Morey 1a57e2b96d chore: 🤖 secret input should default to type password (#269)
* chore: 🤖 secret input should default to type password

* chore: 🤖 storage bucket aws key fields should be passwords
2023-05-22 12:27:06 -07:00

43 lines
952 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)}}
...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>