From adb7cf7ca5a5ba9946fc4c28ff7087a302961ec0 Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Tue, 21 Jun 2022 17:07:15 -0400 Subject: [PATCH 01/12] Toying with insert and update helpers before translation func --- ui/app/components/secure-variable-form.hbs | 107 +++++++++++------- ui/app/components/secure-variable-form.js | 81 ++++++++++--- ui/app/controllers/variables/variable/edit.js | 23 +++- ui/app/templates/variables/variable/edit.hbs | 15 ++- ui/app/templates/variables/variable/index.hbs | 1 + 5 files changed, 166 insertions(+), 61 deletions(-) diff --git a/ui/app/components/secure-variable-form.hbs b/ui/app/components/secure-variable-form.hbs index 55bb348592c2..1d1fa17cf4a0 100644 --- a/ui/app/components/secure-variable-form.hbs +++ b/ui/app/components/secure-variable-form.hbs @@ -1,6 +1,9 @@ -
+{{!-- {{did-insert this.translateAndValidateItems @view}} --}} +{{did-update this.translateAndValidateItems @view}} +{{did-insert this.establishKeyValues}} +{{did-update this.establishKeyValues @model.keyValues}} + + {{!-- TODO: {{if this.parseError 'is-danger'}} on inputs --}}
- {{#each this.keyValues as |entry iter|}} -
- - - {{#if (eq entry this.keyValues.lastObject)}} - - {{else}} - - {{/if}} - {{#each-in entry.warnings as |k v|}} - - {{v}} - - {{/each-in}} + {{#if (eq @view "json")}} +
+ + +
- {{/each}} + {{else}} + {{#each this.keyValues as |entry iter|}} +
+ + + {{#if (eq entry this.keyValues.lastObject)}} + + {{else}} + + {{/if}} + {{#each-in entry.warnings as |k v|}} + + {{v}} + + {{/each-in}} +
+ {{/each}} + {{/if}}