Files
threshold-ui/ui/admin/app/components/grant-string-formats/index.hbs
T
Lisbet Alvarez 990146fa34 refactor: 💡 Update string formats to use select + add options (#3256)
* refactor: 💡 Update string formats to use select + add options

* refactor: 💡 PR feedback

* test: 💍 fix tests

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-18983
2026-05-14 15:21:29 -04:00

47 lines
1.3 KiB
Handlebars

{{!
Copyright IBM Corp. 2021, 2026
SPDX-License-Identifier: BUSL-1.1
}}
<Hds::Form::SuperSelect::Single::Field
name='string-formats'
@onChange={{this.changeSelectedFormatType}}
@selected={{this.selectedFormatType}}
@options={{this.stringFormatTypesList}}
as |F|
>
<F.Label>{{t
'resources.role.edit-grants.string-formats.syntax-format'
}}</F.Label>
<F.Options>
{{#let F.options as |formatType|}}
<Hds::Text::Body @tag='p' @weight='semibold'>{{t
(concat
'resources.role.edit-grants.string-formats.' formatType '.label'
)
}}</Hds::Text::Body>
<Hds::Text::Body @tag='p' @color='faint' @size='100'>{{t
(concat
'resources.role.edit-grants.string-formats.' formatType '.help'
)
}}</Hds::Text::Body>
{{/let}}
</F.Options>
</Hds::Form::SuperSelect::Single::Field>
<Hds::Form::Textarea::Field
name='string-format'
readonly
@value={{this.stringFormat.text}}
@height='3.5rem'
as |F|
>
<F.Label>{{t 'resources.role.edit-grants.string-formats.syntax'}}</F.Label>
</Hds::Form::Textarea::Field>
<Hds::Link::Standalone
@icon='docs-link'
@iconPosition='trailing'
@text={{t 'resources.role.edit-grants.string-formats.more-info'}}
@href={{doc-url this.stringFormat.link}}
/>