Bug 38899: Move the toolbar out of the form

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f24e0d52e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-05-12 09:57:46 +02:00 committed by Paul Derscheid
parent cf18d97ca5
commit 53fdcd4e2c
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
2 changed files with 12 additions and 12 deletions

View File

@ -5,17 +5,17 @@
{{ $__("Edit vendor #%s").format(vendor.id) }}
</h1>
<h1 v-else>{{ $__("Add vendor") }}</h1>
<Toolbar :sticky="true">
<ButtonSubmit :text="$__('Save')" icon="save" />
<ToolbarButton
:to="{ name: 'VendorList' }"
:title="$__('Cancel')"
icon="times"
cssClass="btn btn-link"
>
</ToolbarButton>
</Toolbar>
<form @submit="onSubmit($event)" id="add_vendor">
<Toolbar :sticky="true">
<ButtonSubmit :text="$__('Save')" icon="save" />
<ToolbarButton
:to="{ name: 'VendorList' }"
:title="$__('Cancel')"
icon="times"
cssClass="btn btn-link"
>
</ToolbarButton>
</Toolbar>
<VendorDetails :vendor="vendor" />
<VendorContacts :vendor="vendor" />
<VendorInterfaces :vendor="vendor" />

View File

@ -35,7 +35,7 @@ describe("Vendor CRUD operations", () => {
// Click the button in the toolbar
cy.visit("/cgi-bin/koha/acquisition/vendors");
cy.contains("New vendor").click();
cy.get("#vendor_add h1").contains("Add vendor");
cy.get("h1").contains("Add vendor");
// Fill in the form for normal attributes
cy.get("#vendor_add").contains("Submit").click();
@ -140,7 +140,7 @@ describe("Vendor CRUD operations", () => {
cy.get("#vendors_list table tbody tr:first").contains("Edit").click();
cy.wait("@get-vendor");
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
cy.get("#vendor_add h1").contains("Edit vendor");
cy.get("h1").contains("Edit vendor");
// Form has been correctly filled in
cy.get("#vendor_name").should("have.value", vendor.name);