From cf3acad084df3746d1c1f9a29751c1ac7004c829 Mon Sep 17 00:00:00 2001 From: Devon Anderson Date: Tue, 15 Nov 2022 22:57:39 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Credential=20type=20sele?= =?UTF-8?q?ctor=20refactor=20(#1452)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: ๐ŸŽธ Credential type selector refactor When editing a credential or viewing the details screeen, the credential type should be displayed as a readonly text field โœ… Closes: ICU-6839 * refactor: ๐Ÿ’ก refactored disabled argument for credential type BREAKING CHANGE: ๐Ÿงจ ICU-6839 โœ… Closes: ICU-6839 * refactor: ๐Ÿ’ก Refactored credential-type-field Refactored credential type card ui to look more like a message element than a disabled input โœ… Closes: ICU-6839 Co-authored-by: Randall Morey --- .../form/credential/ssh_private_key/index.hbs | 43 +++++++++---------- .../credential/username_password/index.hbs | 43 +++++++++---------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/ui/admin/app/components/form/credential/ssh_private_key/index.hbs b/ui/admin/app/components/form/credential/ssh_private_key/index.hbs index 3d430ef79..78521aa81 100644 --- a/ui/admin/app/components/form/credential/ssh_private_key/index.hbs +++ b/ui/admin/app/components/form/credential/ssh_private_key/index.hbs @@ -43,10 +43,10 @@ {{/if}} - - <:title>{{t 'form.type.label'}} - <:body> - {{#if @model.isNew}} + {{#if @model.isNew}} + + <:title>{{t 'form.type.label'}} + <:body> - {{else}} - - - - {{/if}} - - + + + {{else}} + + <:title>{{t 'form.type.label'}} + <:description> + + {{t (concat 'resources.credential.types.' @model.type)}} + + + <:body> + {{t + (concat 'resources.credential.help.' @model.type) + }} + + + {{/if}} {{/if}} - - <:title>{{t 'form.type.label'}} - <:body> - {{#if @model.isNew}} + {{#if @model.isNew}} + + <:title>{{t 'form.type.label'}} + <:body> - {{else}} - - - - {{/if}} - - + + + {{else}} + + <:title>{{t 'form.type.label'}} + <:description> + + {{t (concat 'resources.credential.types.' @model.type)}} + + + <:body> + {{t + (concat 'resources.credential.help.' @model.type) + }} + + + {{/if}}