From fb94deab884e60225b77dad5e19d98fc150d2699 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 5 Jan 2021 15:41:27 -0500 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20auth=20method?= =?UTF-8?q?=20form=20to=20type-specific=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/form/auth-method/index.hbs | 62 ++----------------- .../form/auth-method/password/index.hbs | 57 +++++++++++++++++ 2 files changed, 62 insertions(+), 57 deletions(-) create mode 100644 ui/admin/app/components/form/auth-method/password/index.hbs diff --git a/ui/admin/app/components/form/auth-method/index.hbs b/ui/admin/app/components/form/auth-method/index.hbs index 2704507ec..e5fa05828 100644 --- a/ui/admin/app/components/form/auth-method/index.hbs +++ b/ui/admin/app/components/form/auth-method/index.hbs @@ -1,57 +1,5 @@ - - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - +{{component (concat "form/auth-method/" @model.type) + model=@model + submit=@submit + cancel=@cancel +}} diff --git a/ui/admin/app/components/form/auth-method/password/index.hbs b/ui/admin/app/components/form/auth-method/password/index.hbs new file mode 100644 index 000000000..2704507ec --- /dev/null +++ b/ui/admin/app/components/form/auth-method/password/index.hbs @@ -0,0 +1,57 @@ + + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + +