more updates

This commit is contained in:
dharini committed 2022-01-31 11:40:56 -08:00
1 parent 67c4440a90
commit 0577cdec76
4 files changed
+13 -92

No files matched your search

@@ -1,70 +1,14 @@
{{#if @model.compositeType}}
COMES JERE
{{{log 'BLLL' @model.compositeType}}}
{{{log 'NNFRM' @model.isNew}}}
{{#if @model.isNew}}
{{!-- {{#if @model.compositeType}} --}}
{{component
(concat 'form/host-catalog/' @model.compositeType)
model=@model
submit=@submit
cancel=@cancel
}}
{{!-- {{/if}} --}}
{{/if}}
<form.input
@name='name'
@type='name'
@value={{@model.name}}
@label={{t 'form.name.label'}}
@helperText={{t 'form.name.help'}}
@error={{@model.errors.name}}
readonly={{false}}
as |field|
>
{{#if @model.errors.name}}
<field.errors as |errors|>
{{#each @model.errors.name as |error|}}
<errors.message>{{error.message}}</errors.message>
{{/each}}
</field.errors>
{{/if}}
</form.input>
<form.textarea
@name='description'
@type='description'
@value={{@model.description}}
@label={{t 'form.description.label'}}
@helperText={{t 'form.description.help'}}
@error={{@model.errors.description}}
disabled={{@model.isSaving}}
readonly={{false}}
as |field|
>
{{#if @model.errors.description}}
<field.errors as |errors|>
{{#each @model.errors.description as |error|}}
<errors.message>{{error.message}}</errors.message>
{{/each}}
</field.errors>
{{/if}}
</form.textarea>
<p>Place Radio Button Group Here</p>
{{#if @model.isNew}}
{{#if @model.type}}
{{component
(concat 'form/host-catalog/' @model.type)
model=@model
submit=@submit
cancel=@cancel
}}
{{/if}}
{{/if}}
{{#if (can 'save model' @model)}}
<form.actions
@disabled={{if @model.cannotSave @model.cannotSave}}
@enableEditText={{t 'actions.edit-form'}}
@submitText={{t 'actions.save'}}
@cancelText={{t 'actions.cancel'}}
/>
{{/if}}
</Rose::Form>
@@ -0,0 +1,2 @@
THIS IS DYNAINC
{{{log @model 'NAMEEEE'}}}
@@ -1,3 +1,4 @@
STATIC {{{log 'STATTTTTIC' @model}}}
<Rose::Form
@onSubmit={{@submit}}
@cancel={{@cancel}}
@@ -21,7 +22,7 @@
{{/each}}
</field.errors>
{{/if}}
</form.input>
</form.input> --}}
<form.textarea
@name='description'
@@ -42,7 +43,6 @@
</field.errors>
{{/if}}
</form.textarea>
<<<<<<< HEAD
<form.fieldset>
<:title>{{t 'resources.host-catalog.type'}}</:title>
<:body>
@@ -62,32 +62,6 @@
</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}}
@@ -12,6 +12,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route {
queryParams = {
type: {
refreshModel: true,
replace: true
},
};
@@ -23,7 +24,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route {
*/
model(params) {
const scopeModel = this.modelFor('scopes.scope');
if (!params.type) params.type = 'static';
if (!params.type) params.type = 'plugin';
return this.store.createRecord('host-catalog', {
type: params.type,
scopeModel,