Files
threshold-ui/ui/admin/app/components/form/field/secret-input/index.hbs
T
2023-03-20 23:14:03 +05:30

41 lines
847 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
<div class='secret-input'>
<Hds::Form::TextInput::Field
@isRequired={{@isRequired}}
@isInvalid={{@isInvalid}}
@value={{this.secret}}
@type={{@type}}
name={{@name}}
disabled={{not this.editing}}
placeholder=' '
...attributes
as |F|
>
{{yield F}}
</Hds::Form::TextInput::Field>
{{#if this.isDisabled}}
<Hds::Button
@text={{t 'actions.edit'}}
@icon='edit'
disabled={{@disabled}}
/>
{{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>