From f1e612385d55fc900990af16491b0fad3b9cbcfc Mon Sep 17 00:00:00 2001 From: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Date: Thu, 29 Jun 2023 12:54:04 -0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20add=20support=20for?= =?UTF-8?q?=20named=20block=20content=20in=20form=20actions=20(#1746)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 💡 add support for named block content in form actions ✅ Closes: ICU-9507 * refactor: 💡 remove yielded variables --- .../form/authenticate/details/index.hbs | 15 ++++++++---- .../form/authenticate/oidc/index.hbs | 16 ++++++++----- .../rose/form/actions/edit-toggle/index.hbs | 14 +++++++---- .../components/rose/form/actions/index.hbs | 24 +++++++++++-------- ui/admin/app/styles/app.scss | 8 ------- ui/desktop/app/styles/app.scss | 6 ----- ui/desktop/app/templates/cluster-url.hbs | 12 +++++++++- 7 files changed, 54 insertions(+), 41 deletions(-) diff --git a/addons/core/addon/components/form/authenticate/details/index.hbs b/addons/core/addon/components/form/authenticate/details/index.hbs index 177e9a2ee..97636d8a1 100644 --- a/addons/core/addon/components/form/authenticate/details/index.hbs +++ b/addons/core/addon/components/form/authenticate/details/index.hbs @@ -33,9 +33,14 @@ {{t 'form.password.label'}} - - + + <:actions> + + + \ No newline at end of file diff --git a/addons/core/addon/components/form/authenticate/oidc/index.hbs b/addons/core/addon/components/form/authenticate/oidc/index.hbs index 61ca08cfe..603f02378 100644 --- a/addons/core/addon/components/form/authenticate/oidc/index.hbs +++ b/addons/core/addon/components/form/authenticate/oidc/index.hbs @@ -9,10 +9,14 @@ @disabled={{@disabled}} as |form| > - - - + + <:actions> + + + \ No newline at end of file diff --git a/addons/rose/addon/components/rose/form/actions/edit-toggle/index.hbs b/addons/rose/addon/components/rose/form/actions/edit-toggle/index.hbs index 05a0d09b8..cb8f8b869 100644 --- a/addons/rose/addon/components/rose/form/actions/edit-toggle/index.hbs +++ b/addons/rose/addon/components/rose/form/actions/edit-toggle/index.hbs @@ -4,9 +4,13 @@ }} - + {{#if (has-block 'edit')}} + {{yield to='edit'}} + {{else}} + + {{/if}} \ No newline at end of file diff --git a/addons/rose/addon/components/rose/form/actions/index.hbs b/addons/rose/addon/components/rose/form/actions/index.hbs index 9992c5e1c..95efcbcfa 100644 --- a/addons/rose/addon/components/rose/form/actions/index.hbs +++ b/addons/rose/addon/components/rose/form/actions/index.hbs @@ -4,17 +4,21 @@ }} - - {{#if this.showCancel}} + {{#if (has-block 'actions')}} + {{yield to='actions'}} + {{else}} + {{#if this.showCancel}} + + {{/if}} {{/if}} \ No newline at end of file diff --git a/ui/admin/app/styles/app.scss b/ui/admin/app/styles/app.scss index 5014022ed..58700d1c9 100644 --- a/ui/admin/app/styles/app.scss +++ b/ui/admin/app/styles/app.scss @@ -168,14 +168,6 @@ } } -.rose-frame { - .rose-form-actions { - .hds-button { - width: 100%; - } - } -} - .rose-dialog-cover { svg { max-width: 20rem; diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 8cbe490f1..28dd92628 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -286,12 +286,6 @@ .branded-card-description { margin-bottom: sizing.rems(l); } - - .rose-form-actions { - .hds-button { - width: 100%; - } - } } @media (max-width: media.width(medium)) { diff --git a/ui/desktop/app/templates/cluster-url.hbs b/ui/desktop/app/templates/cluster-url.hbs index d886476ea..572815a29 100644 --- a/ui/desktop/app/templates/cluster-url.hbs +++ b/ui/desktop/app/templates/cluster-url.hbs @@ -23,7 +23,17 @@ @helperText={{t 'form.cluster-url.description'}} {{autofocus}} /> - + + + <:actions> + + + \ No newline at end of file