From f81d509ca7dace11dc75fce44745d2ba006a3669 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 25 Sep 2020 19:07:56 -0400 Subject: [PATCH] feature: enable form edit mode across all resource forms --- ui/core/app/components/form/account/password/index.hbs | 4 ++++ ui/core/app/components/form/auth-method/index.hbs | 4 ++++ ui/core/app/components/form/group/index.hbs | 4 ++++ ui/core/app/components/form/host-catalog/index.hbs | 4 ++++ ui/core/app/components/form/host-set/index.hbs | 4 ++++ ui/core/app/components/form/host/index.hbs | 2 ++ ui/core/app/components/form/org/index.hbs | 4 ++++ ui/core/app/components/form/project/index.hbs | 4 ++++ ui/core/app/components/form/role/index.hbs | 4 ++++ ui/core/app/components/form/target/index.hbs | 4 ++++ ui/core/app/components/form/user/index.hbs | 4 ++++ ui/core/app/templates/scopes/scope/groups/group/index.hbs | 2 +- ui/core/translations/actions/en-us.yaml | 1 + 13 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ui/core/app/components/form/account/password/index.hbs b/ui/core/app/components/form/account/password/index.hbs index 492e1c658..33e8a3759 100644 --- a/ui/core/app/components/form/account/password/index.hbs +++ b/ui/core/app/components/form/account/password/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -33,6 +35,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -85,6 +88,7 @@ diff --git a/ui/core/app/components/form/auth-method/index.hbs b/ui/core/app/components/form/auth-method/index.hbs index df59e01d8..ffa39a264 100644 --- a/ui/core/app/components/form/auth-method/index.hbs +++ b/ui/core/app/components/form/auth-method/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -33,6 +35,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -48,6 +51,7 @@ diff --git a/ui/core/app/components/form/group/index.hbs b/ui/core/app/components/form/group/index.hbs index 0bcc6df4c..0e024b1fb 100644 --- a/ui/core/app/components/form/group/index.hbs +++ b/ui/core/app/components/form/group/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -11,6 +12,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -28,6 +30,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -43,6 +46,7 @@ diff --git a/ui/core/app/components/form/host-catalog/index.hbs b/ui/core/app/components/form/host-catalog/index.hbs index 0bcc6df4c..0e024b1fb 100644 --- a/ui/core/app/components/form/host-catalog/index.hbs +++ b/ui/core/app/components/form/host-catalog/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -11,6 +12,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -28,6 +30,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -43,6 +46,7 @@ diff --git a/ui/core/app/components/form/host-set/index.hbs b/ui/core/app/components/form/host-set/index.hbs index 82f093d2c..208fe8e0b 100644 --- a/ui/core/app/components/form/host-set/index.hbs +++ b/ui/core/app/components/form/host-set/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -17,6 +18,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -34,6 +36,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -49,6 +52,7 @@ diff --git a/ui/core/app/components/form/host/index.hbs b/ui/core/app/components/form/host/index.hbs index af2ddf471..2cc0526a2 100644 --- a/ui/core/app/components/form/host/index.hbs +++ b/ui/core/app/components/form/host/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -69,6 +70,7 @@ diff --git a/ui/core/app/components/form/org/index.hbs b/ui/core/app/components/form/org/index.hbs index 0bcc6df4c..0e024b1fb 100644 --- a/ui/core/app/components/form/org/index.hbs +++ b/ui/core/app/components/form/org/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -11,6 +12,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -28,6 +30,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -43,6 +46,7 @@ diff --git a/ui/core/app/components/form/project/index.hbs b/ui/core/app/components/form/project/index.hbs index 0bcc6df4c..0e024b1fb 100644 --- a/ui/core/app/components/form/project/index.hbs +++ b/ui/core/app/components/form/project/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -11,6 +12,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -28,6 +30,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -43,6 +46,7 @@ diff --git a/ui/core/app/components/form/role/index.hbs b/ui/core/app/components/form/role/index.hbs index a35279612..ed1330e4c 100644 --- a/ui/core/app/components/form/role/index.hbs +++ b/ui/core/app/components/form/role/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -11,6 +12,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} @helperText={{t "form.name.help"}} readonly={{false}} @@ -29,6 +31,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} @helperText={{t "form.description.help"}} disabled={{@model.isSaving}} @@ -45,6 +48,7 @@ diff --git a/ui/core/app/components/form/target/index.hbs b/ui/core/app/components/form/target/index.hbs index f061923bf..cb03dac6a 100644 --- a/ui/core/app/components/form/target/index.hbs +++ b/ui/core/app/components/form/target/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -17,6 +18,7 @@ @type="text" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} @helperText={{t "form.name.help"}} as |field|> @@ -34,6 +36,7 @@ @type="text" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} @helperText={{t "form.description.help"}} as |field|> @@ -69,6 +72,7 @@ diff --git a/ui/core/app/components/form/user/index.hbs b/ui/core/app/components/form/user/index.hbs index 0bcc6df4c..0e024b1fb 100644 --- a/ui/core/app/components/form/user/index.hbs +++ b/ui/core/app/components/form/user/index.hbs @@ -3,6 +3,7 @@ @cancel={{@cancel}} @disabled={{@model.isSaving}} @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > @@ -11,6 +12,7 @@ @type="name" @value={{@model.name}} @label={{t "form.name.label"}} + @helperText={{t "form.name.help"}} @error={{@model.errors.name}} readonly={{false}} as |field|> @@ -28,6 +30,7 @@ @type="description" @value={{@model.description}} @label={{t "form.description.label"}} + @helperText={{t "form.description.help"}} @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} @@ -43,6 +46,7 @@ diff --git a/ui/core/app/templates/scopes/scope/groups/group/index.hbs b/ui/core/app/templates/scopes/scope/groups/group/index.hbs index 1fb27689d..cf2d36c97 100644 --- a/ui/core/app/templates/scopes/scope/groups/group/index.hbs +++ b/ui/core/app/templates/scopes/scope/groups/group/index.hbs @@ -1,4 +1,4 @@ -