vault/ui/lib/ldap/addon/components/page/library/create-and-edit.hbs
Angel Garbarino a51c5ed362
Clean up button test selectors (#30694)
* clean up selectors file and then update testButton to buttonByAttr

* a lot but not really in the scheme of things

* fix component test failures

* fix acceptance test failures

* fix namespace selector

* clean up remaining tests

* another test

* last test

* small changes, but I have test failures

* a mess in custom messages, really hard to test because of test pollution.

* make data-test-submit vs data-test-save

* change other-methods to sign in with other methods

* clean up of failing test

* buttonByAttr to button

* clean up test pollution on config messages

* sweep of clean ups

* another round of small cleanups

* fix some message things, remaining oidc issue?

* use a runCmd to better delete things

* fix to amend for recent auth test changes

* remove skip
2025-06-10 16:25:34 -04:00

52 lines
1.3 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<PageHeader as |p|>
<p.top>
<Page::Breadcrumbs @breadcrumbs={{@breadcrumbs}} />
</p.top>
<p.levelLeft>
<h1 class="title is-3">
{{if @model.isNew "Create Library" "Edit Library"}}
</h1>
</p.levelLeft>
</PageHeader>
<hr class="is-marginless has-background-gray-200" />
<form {{on "submit" (perform this.save)}} class="has-top-margin-m">
<MessageError @errorMessage={{this.error}} />
{{#each @model.formFields as |field|}}
<FormField @attr={{field}} @model={{@model}} @modelValidations={{this.modelValidations}} />
{{/each}}
<hr class="has-background-gray-200 has-top-margin-l" />
<div class="has-top-margin-l has-bottom-margin-l is-flex">
<Hds::Button
@text={{if @model.isNew "Create library" "Save"}}
data-test-submit
type="submit"
disabled={{this.save.isRunning}}
/>
<Hds::Button
@text="Cancel"
@color="secondary"
class="has-left-margin-xs"
data-test-cancel
disabled={{this.save.isRunning}}
{{on "click" this.cancel}}
/>
{{#if this.invalidFormMessage}}
<AlertInline
@type="danger"
class="has-top-padding-s"
@message={{this.invalidFormMessage}}
data-test-invalid-form-message
/>
{{/if}}
</div>
</form>