Bugzilla – Attachment 183118 Details for
Bug 38899
Allow the Vue toolbar to be sticky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38899: Improve HTML consistency
Bug-38899-Improve-HTML-consistency.patch (text/plain), 4.61 KB, created by
Jonathan Druart
on 2025-06-10 09:31:53 UTC
(
hide
)
Description:
Bug 38899: Improve HTML consistency
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-06-10 09:31:53 UTC
Size:
4.61 KB
patch
obsolete
>From 178aadd0cefd99d448c983ae67b1ca7b8a72c103 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Mon, 12 May 2025 11:43:06 +0100 >Subject: [PATCH] Bug 38899: Improve HTML consistency > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/js/vue/components/ButtonSubmit.vue | 9 ++++++++- > .../js/vue/components/Vendors/VendorFormAdd.vue | 15 +++++++++++---- > .../integration/Acquisitions/Vendors_spec.ts | 6 +++--- > 3 files changed, 22 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue >index cd0e84d83ed..2e43c2e3f8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue >@@ -1,5 +1,9 @@ > <template> >- <button type="submit" class="btn btn-primary"> >+ <button v-if="form" @click="form.requestSubmit()" class="btn btn-primary"> >+ <font-awesome-icon v-if="icon" :icon="icon" /> >+ {{ text }} >+ </button> >+ <button v-else type="submit" class="btn btn-primary"> > <font-awesome-icon v-if="icon" :icon="icon" /> > {{ text }} > </button> >@@ -18,6 +22,9 @@ export default { > type: String, > required: false, > }, >+ form: { >+ type: Object, >+ }, > }, > }; > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue >index 55f193e32bf..6b104753a67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue >@@ -1,12 +1,12 @@ > <template> > <div v-if="!initialized">{{ $__("Loading") }}</div> >- <template v-else> >+ <main id="vendors_add" v-else> > <h1 v-if="vendor.id"> > {{ $__("Edit vendor #%s").format(vendor.id) }} > </h1> > <h1 v-else>{{ $__("Add vendor") }}</h1> > <Toolbar :sticky="true"> >- <ButtonSubmit :text="$__('Save')" icon="save" /> >+ <ButtonSubmit :text="$__('Save')" icon="save" :form="vendorForm" /> > <ToolbarButton > :to="{ name: 'VendorList' }" > :title="$__('Cancel')" >@@ -15,7 +15,7 @@ > > > </ToolbarButton> > </Toolbar> >- <form @submit="onSubmit($event)" id="add_vendor"> >+ <form @submit="onSubmit($event)" ref="vendorForm"> > <VendorDetails :vendor="vendor" /> > <VendorContacts :vendor="vendor" /> > <VendorInterfaces :vendor="vendor" /> >@@ -25,7 +25,7 @@ > :discountValid="discountValid" > /> > </form> >- </template> >+ </main> > </template> > > <script> >@@ -38,8 +38,15 @@ import VendorOrderingInformation from "./VendorOrderingInformation.vue"; > import VendorInterfaces from "./VendorInterfaces.vue"; > import Toolbar from "../Toolbar.vue"; > import ToolbarButton from "../ToolbarButton.vue"; >+import { ref } from "vue"; > > export default { >+ setup() { >+ const vendorForm = ref(); >+ return { >+ vendorForm, >+ }; >+ }, > data() { > return { > vendor: { >diff --git a/t/cypress/integration/Acquisitions/Vendors_spec.ts b/t/cypress/integration/Acquisitions/Vendors_spec.ts >index 29629460142..23142dd346a 100644 >--- a/t/cypress/integration/Acquisitions/Vendors_spec.ts >+++ b/t/cypress/integration/Acquisitions/Vendors_spec.ts >@@ -38,7 +38,7 @@ describe("Vendor CRUD operations", () => { > cy.get("h1").contains("Add vendor"); > > // Fill in the form for normal attributes >- cy.get("#vendor_add").contains("Submit").click(); >+ cy.get("#vendors_add").contains("Save").click(); > cy.get("input:invalid,textarea:invalid,select:invalid").should( > "have.length", > 1 >@@ -114,7 +114,7 @@ describe("Vendor CRUD operations", () => { > statusCode: 201, > body: vendor, > }); >- cy.get("#vendor_add").contains("Submit").click(); >+ cy.get("#vendors_add").contains("Save").click(); > cy.get("main div[class='alert alert-info']").contains("Vendor created"); > }); > >@@ -153,7 +153,7 @@ describe("Vendor CRUD operations", () => { > statusCode: 200, > body: vendor, > }); >- cy.get("#vendor_add").contains("Submit").click(); >+ cy.get("#vendors_add").contains("Save").click(); > cy.get("main div[class='alert alert-info']").contains("Vendor updated"); > }); > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38899
:
176545
|
176546
|
181822
|
181823
|
181851
|
181852
|
181965
|
182151
|
182249
|
182250
|
182255
|
182449
|
182580
|
182646
|
182973
|
182974
|
182975
|
182976
|
182977
|
182978
|
182979
|
182980
|
183114
|
183115
|
183116
|
183117
| 183118 |
183119
|
183120
|
183121