43 lines
936 B
Handlebars
43 lines
936 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={{@type}}
|
|
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> |