fix: Protect catalog type selectors in edit mode

This commit is contained in:
Susmitha Girumala authored and dharini committed 2022-01-31 11:39:26 -08:00
1 parent 46b6c51f5d
commit 2de2a79e7c
2 files changed
+28 -5

No files matched your search

@@ -7,9 +7,6 @@
}}
{{/if}}
<<<<<<< HEAD
{{{log @model 'modede'}}}
=======
<form.input
@name='name'
@type='name'
@@ -70,5 +67,4 @@
@cancelText={{t 'actions.cancel'}}
/>
{{/if}}
</Rose::Form>
>>>>>>> 6a8bbcad (feat: Add type param support to creation form of host catalog)
</Rose::Form>
@@ -42,6 +42,7 @@
</field.errors>
{{/if}}
</form.textarea>
<<<<<<< HEAD
<form.fieldset>
<:title>{{t 'resources.host-catalog.type'}}</:title>
<:body>
@@ -61,6 +62,32 @@
</form.radioGroup>
</:body>
</form.fieldset>
=======
{{#if @model.isNew}}
<form.fieldset>
<:title>{{t 'resources.host-catalog.type'}}</:title>
<:body>
<form.radioGroup @name='types' @changed={{@changeType}}
as |radioGroup|>
<radioGroup.card
@label={{t 'resources.host-catalog.types.static'}}
@value='static'
@helperText={{t 'resources.host-catalog.form.types.static.help'}}
@layout='wide'
/>
<radioGroup.card
@label={{t 'resources.host-catalog.types.dynamic'}}
@value='dynamic'
@helperText={{t 'resources.host-catalog.form.types.dynamic.help'}}
@layout='wide'
/>
</form.radioGroup>
</:body>
</form.fieldset>
{{/if}}
>>>>>>> f3d3bdd7 (fix: Protect catalog type selectors in edit mode)
{{#if (can 'save model' @model)}}
<form.actions
@disabled={{if @model.cannotSave @model.cannotSave}}