From f38dd58078bc29c06e578a4e243fa0249effb209 Mon Sep 17 00:00:00 2001 From: Jai <41024828+ChaiWithJai@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:56:31 -0500 Subject: [PATCH] ui: move "add more" button in variable create and edit forms (#15434) * refact: move conditional logic * chore: prettify template * test: update test for markup change * Revert "chore: prettify template" This reverts commit ff1e0f02eb7ea30ede2cf93e9646a339601acdbe. * styles: add space to save button for consistency * style: add save selector for Submit button * refact: conditionally render add button based on view * Revert "test: update test for markup change" This reverts commit 59318cde68b50aaf915be7cb9f7e332b7f0204c7. * style: add more button wonkiness * test: use data-test attr * test: handle non-table view on create * ui: add reactive getter property to use in template * style use grid instead of margin Co-authored-by: Preston Bourne --- ui/app/components/variable-form.hbs | 24 +++++++++---------- ui/app/components/variable-form.js | 5 ++++ ui/app/styles/components/variables.scss | 16 +++++++++---- .../components/variable-form-test.js | 22 ++++++++--------- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/ui/app/components/variable-form.hbs b/ui/app/components/variable-form.hbs index 852696195..2e8ad2aa7 100644 --- a/ui/app/components/variable-form.hbs +++ b/ui/app/components/variable-form.hbs @@ -110,16 +110,6 @@ /> - {{#if (eq entry this.keyValues.lastObject)}} - - {{else}} - {{/if}} {{#each-in entry.warnings as |k v|}} {{v}} @@ -148,9 +137,20 @@ {{/if}}