diff --git a/ui/admin/app/components/form/credential-library/vault-generic/index.hbs b/ui/admin/app/components/form/credential-library/vault-generic/index.hbs
index 11ef18a8e..9f143c9a7 100644
--- a/ui/admin/app/components/form/credential-library/vault-generic/index.hbs
+++ b/ui/admin/app/components/form/credential-library/vault-generic/index.hbs
@@ -11,11 +11,10 @@
as |form|
>
{{#each @model.errors.name as |error|}}
- {{error.message}}
+
+ {{error.message}}
+
{{/each}}
{{/if}}
diff --git a/ui/admin/app/components/form/credential-library/vault-ssh-certificate/index.hbs b/ui/admin/app/components/form/credential-library/vault-ssh-certificate/index.hbs
index a8b977486..08bbcb553 100644
--- a/ui/admin/app/components/form/credential-library/vault-ssh-certificate/index.hbs
+++ b/ui/admin/app/components/form/credential-library/vault-ssh-certificate/index.hbs
@@ -11,12 +11,12 @@
@showEditToggle={{if @model.isNew false true}}
as |form|
>
+
{{#each @model.errors.name as |error|}}
- {{error.message}}
+
+ {{error.message}}
+
{{/each}}
{{/if}}
diff --git a/ui/admin/app/components/form/credential/username_password/index.hbs b/ui/admin/app/components/form/credential/username_password/index.hbs
index 30ee913f1..5046eae84 100644
--- a/ui/admin/app/components/form/credential/username_password/index.hbs
+++ b/ui/admin/app/components/form/credential/username_password/index.hbs
@@ -51,6 +51,7 @@
{{/if}}
+
{{#if @model.isNew}}
{{t 'form.type.label'}}
diff --git a/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/new.js b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/new.js
index c55295e4b..a620e73d6 100644
--- a/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/new.js
+++ b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries/new.js
@@ -51,16 +51,23 @@ export default class ScopesScopeCredentialStoresCredentialStoreCredentialLibrari
const { id: credential_store_id } = this.modelFor(
'scopes.scope.credential-stores.credential-store',
);
+ const { name, description } = this.currentModel ?? {};
+
+ if (this.currentModel?.isNew) {
+ this.currentModel.rollbackAttributes();
+ }
// Set the type to generic vault if feature flag isn't enabled in cases where
// user sets the query parameter manually
- if (!this.features.isEnabled('ssh-target')) {
- type = TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC;
- }
+ type = this.features.isEnabled('ssh-target')
+ ? type
+ : TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC;
return this.store.createRecord('credential-library', {
type,
credential_store_id,
+ name,
+ description,
});
}
}