static form with radioCards
This commit is contained in:
1 parent
f13a3ee18c
commit
e0f569229b
4 files changed
+36
-81
No files matched your search
@@ -1,38 +1 @@
|
||||
<Rose::Form
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
{{!-- @error={{@model.errors.base}}
|
||||
@showEditToggle={{if @model.isNew false true}} --}}
|
||||
as |form|
|
||||
>
|
||||
AWASSS!
|
||||
<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>
|
||||
|
||||
|
||||
{{#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>
|
||||
AWS Form
|
||||
@@ -1,38 +1 @@
|
||||
<Rose::Form
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
{{!-- @error={{@model.errors.base}}
|
||||
@showEditToggle={{if @model.isNew false true}} --}}
|
||||
as |form|
|
||||
>
|
||||
AZURE!!
|
||||
<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>
|
||||
|
||||
|
||||
{{#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>
|
||||
Azure Form
|
||||
@@ -4,7 +4,6 @@
|
||||
model=@model
|
||||
submit=@submit
|
||||
cancel=@cancel
|
||||
changeType=@changeType
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
{{!-- @error={{@model.errors.base}}
|
||||
@showEditToggle={{if @model.isNew false true}} --}}
|
||||
as |form|
|
||||
>
|
||||
STATIC!!
|
||||
<form.input
|
||||
@name='name'
|
||||
@type='name'
|
||||
@@ -26,7 +23,40 @@ STATIC!!
|
||||
{{/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>
|
||||
|
||||
<Rose::Form::Radio::Group @name='types' as |radioGroup|>
|
||||
<radioGroup.card
|
||||
@label={{t 'resources.host-catalog.types.static'}}
|
||||
@value='static'
|
||||
@helperText={{t 'resources.host-catalog.form.types.static.help'}}
|
||||
@layout='tile'
|
||||
/>
|
||||
<radioGroup.card
|
||||
@label={{t 'resources.host-catalog.types.dynamic'}}
|
||||
@value='dynamic'
|
||||
@helperText={{t 'resources.host-catalog.form.types.dynamic.help'}}
|
||||
@layout='tile'
|
||||
/>
|
||||
</Rose::Form::Radio::Group>
|
||||
{{#if (can 'save model' @model)}}
|
||||
<form.actions
|
||||
@disabled={{if @model.cannotSave @model.cannotSave}}
|
||||
|
||||
Reference in new issue
Block a user