* [COMPLIANCE] Add Copyright and License Headers * chore: 🤖 update Copyright headers to satisfy our lint rules --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
62 lines
1.6 KiB
Handlebars
62 lines
1.6 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: MPL-2.0
|
|
}}
|
|
|
|
<Rose::Form
|
|
@onSubmit={{@submit}}
|
|
@cancel={{@cancel}}
|
|
@disabled={{@model.isSaving}}
|
|
@showEditToggle={{if @model.isNew false true}}
|
|
as |form|
|
|
>
|
|
|
|
<Hds::Form::TextInput::Field
|
|
@isOptional={{true}}
|
|
@value={{@model.name}}
|
|
@isInvalid={{@model.errors.name}}
|
|
@type='text'
|
|
name='name'
|
|
disabled={{form.disabled}}
|
|
{{on 'input' (set-from-event @model 'name')}}
|
|
as |F|
|
|
>
|
|
<F.Label>{{t 'form.name.label'}}</F.Label>
|
|
<F.HelperText>{{t 'form.name.help'}}</F.HelperText>
|
|
{{#if @model.errors.name}}
|
|
<F.Error as |E|>
|
|
{{#each @model.errors.name as |error|}}
|
|
<E.Message>{{error.message}}</E.Message>
|
|
{{/each}}
|
|
</F.Error>
|
|
{{/if}}
|
|
</Hds::Form::TextInput::Field>
|
|
|
|
<Hds::Form::Textarea::Field
|
|
@isOptional={{true}}
|
|
@value={{@model.description}}
|
|
@isInvalid={{@model.errors.description}}
|
|
name='description'
|
|
disabled={{form.disabled}}
|
|
as |F|
|
|
>
|
|
<F.Label>{{t 'form.description.label'}}</F.Label>
|
|
<F.HelperText>{{t 'form.description.help'}}</F.HelperText>
|
|
{{#if @model.errors.description}}
|
|
<F.Error as |E|>
|
|
{{#each @model.errors.description as |error|}}
|
|
<E.Message>{{error.message}}</E.Message>
|
|
{{/each}}
|
|
</F.Error>
|
|
{{/if}}
|
|
</Hds::Form::Textarea::Field>
|
|
|
|
{{#if (can 'save model' @model)}}
|
|
<form.actions
|
|
@enableEditText={{t 'actions.edit-form'}}
|
|
@submitText={{t 'actions.save'}}
|
|
@cancelText={{t 'actions.cancel'}}
|
|
/>
|
|
{{/if}}
|
|
|
|
</Rose::Form> |