2020-01-28 14:25:52 +00:00
|
|
|
{{#if item.ID }}
|
|
|
|
{{title 'Edit Intention'}}
|
|
|
|
{{else}}
|
|
|
|
{{title 'New Intention'}}
|
|
|
|
{{/if}}
|
|
|
|
|
2020-02-19 19:26:38 +00:00
|
|
|
<AppView @class="intention edit" @loading={{isLoading}}>
|
|
|
|
<BlockSlot @name="notification" as |status type|>
|
2018-08-29 18:14:31 +00:00
|
|
|
{{partial 'dc/intentions/notifications'}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
2018-05-22 15:03:45 +00:00
|
|
|
<ol>
|
2018-07-04 16:23:33 +00:00
|
|
|
<li><a data-test-back href={{href-to 'dc.intentions'}}>All Intentions</a></li>
|
2018-05-22 15:03:45 +00:00
|
|
|
</ol>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
2018-05-22 15:03:45 +00:00
|
|
|
<h1>
|
|
|
|
{{#if item.ID }}
|
|
|
|
Edit Intention
|
|
|
|
{{else}}
|
|
|
|
New Intention
|
|
|
|
{{/if}}
|
|
|
|
</h1>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
2018-05-22 15:03:45 +00:00
|
|
|
{{#if (not create) }}
|
2020-02-19 19:26:38 +00:00
|
|
|
<FeedbackDialog @type="inline">
|
|
|
|
<BlockSlot @name="action" as |success error|>
|
|
|
|
<CopyButton @success={{action success}} @error={{action error}} @clipboardText={{item.ID}} @title="copy UUID to clipboard">
|
2018-05-22 15:03:45 +00:00
|
|
|
Copy UUID
|
2020-02-19 19:26:38 +00:00
|
|
|
</CopyButton>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="success" as |transition|>
|
2018-09-21 10:13:21 +00:00
|
|
|
<p class={{transition}}>
|
2018-05-22 15:03:45 +00:00
|
|
|
Copied UUID!
|
|
|
|
</p>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="error" as |transition|>
|
2018-09-21 10:13:21 +00:00
|
|
|
<p class={{transition}}>
|
2018-05-22 15:03:45 +00:00
|
|
|
Sorry, something went wrong!
|
|
|
|
</p>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</FeedbackDialog>
|
2018-05-22 15:03:45 +00:00
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-04-01 08:55:49 +00:00
|
|
|
<ConsulIntentionForm
|
|
|
|
@item={{item}}
|
|
|
|
@services={{services}}
|
|
|
|
@nspaces={{nspaces}}
|
|
|
|
@ondelete={{action "route" "delete"}}
|
|
|
|
@onsubmit={{action "route" (if item.isNew "create" "update")}}
|
|
|
|
@oncancel={{action "route" "cancel"}}
|
|
|
|
/>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|