From 1f09a11f53d511a1d023d2d5c8e7b0a42f928b8e Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 8 Mar 2024 11:58:33 -0100 Subject: [PATCH] Bug 36285: [PoC] Move ERM specific styling to all of koha Staff forms This is just a proof of concept 1) Before applying the patch, access some (or all) of the links below. 2) Apply patch 3) Run yarn css:build to rebuild scss 4) Refresh each of the pages and notice the changes Some form examples: /cgi-bin/koha/acqui/supplier.pl?op=enter /cgi-bin/koha/serials/serials-home.pl /cgi-bin/koha/serials/subscription-add.pl /cgi-bin/koha/erm/eholdings/local/titles/add /cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&referer=list /cgi-bin/koha/suggestion/suggestion.pl?op=add_form&branchcode=CPL Side menu changes: /cgi-bin/koha/members/members-home.pl /cgi-bin/koha/serials/serials-search.pl # Press Search A problem arises for some inputs that have the size property e.g. size="4" on the new purchase suggestion form, and others. With this new change, these inputs lose their initial enforced "smaller" size. I think this should be iterated and made more streamlined and use a .input-small class of the size. --- .../intranet-tmpl/prog/css/src/_forms.scss | 24 +++++++++++++++++++ .../prog/js/vue/components/ERM/Main.vue | 18 -------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_forms.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_forms.scss index 99f8adfbca8..abefb41cf57 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_forms.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_forms.scss @@ -1,6 +1,30 @@ fieldset { @include card; + .v-select, + select, + textarea, + input{ + &:not([type="submit"]):not([type="search"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]) { + border-color: rgba(60, 60, 60, 0.26); + border-width: 1px; + border-radius: 4px; + min-width: 30%; + line-height: 1.5; + } + } + + .v-select, + select { + display: inline-block; + background-color: white; + width: 30%; + } + + .flatpickr-input { + width: 30%; + } + legend { border-bottom: 0 none; color: #696969; diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue index 5cccf1b4abe..ffcdbf4dd74 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue @@ -176,24 +176,6 @@ export default { padding-left: 2em; font-size: 100%; } - -form .v-select { - display: inline-block; - background-color: white; - width: 30%; -} - -.v-select, -input:not([type="submit"]):not([type="search"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]), -textarea { - border-color: rgba(60, 60, 60, 0.26); - border-width: 1px; - border-radius: 4px; - min-width: 30%; -} -.flatpickr-input { - width: 30%; -} #navmenulist ul li a.current.disabled { background-color: inherit; border-left: 5px solid #e6e6e6; -- 2.30.2