prettify peer/initiate form

pull/15156/head
Michael Klein 2022-10-26 10:11:41 +02:00
parent 1bdad89026
commit 44c7614b3b
1 changed files with 33 additions and 44 deletions

View File

@ -1,27 +1,20 @@
<div <div class={{class-map "consul-peer-form-initiate"}} ...attributes>
class={{class-map
'consul-peer-form-initiate'
}}
...attributes
>
<DataWriter <DataWriter
@sink={{uri @sink={{uri
'/${partition}/${nspace}/${dc}/peer' "/${partition}/${nspace}/${dc}/peer"
(hash (hash
partition=(or @item.Partition '') partition=(or @item.Partition "")
nspace=(or @item.Namespace '') nspace=(or @item.Namespace "")
dc=(or @item.Datacenter '') dc=(or @item.Datacenter "")
) )
}} }}
@type={{'peer'}} @type={{"peer"}}
@label={{'peer'}} @label={{"peer"}}
@onchange={{fn (optional @onsubmit) @item}} @onchange={{fn (optional @onsubmit) @item}}
as |writer|> as |writer|
>
<BlockSlot @name="error" as |after error|> <BlockSlot @name="error" as |after error|>
<Notice <Notice @type="error" role="alert" as |notice|>
@type="error"
role="alert"
as |notice|>
<notice.Body> <notice.Body>
<p> <p>
<strong>Error</strong><br /> <strong>Error</strong><br />
@ -31,22 +24,18 @@
</Notice> </Notice>
</BlockSlot> </BlockSlot>
<BlockSlot @name="content"> <BlockSlot @name="content">
{{#let {{#let (unique-id) as |id|}}
(unique-id) <form id={{id}} {{on "submit" (fn writer.persist @item)}}>
as |id|}} {{yield
<form (hash
id={{id}} Fieldsets=(component
{{on 'submit' (fn writer.persist @item)}} "consul/peer/form/initiate/fieldsets" item=@item
>
{{yield (hash
Fieldsets=(component "consul/peer/form/initiate/fieldsets"
item=@item
) )
Actions=(component "consul/peer/form/initiate/actions" Actions=(component
item=@item "consul/peer/form/initiate/actions" item=@item id=id
id=id
) )
)}} )
}}
</form> </form>
{{/let}} {{/let}}
</BlockSlot> </BlockSlot>