From cabc96f761d8e88348ecbd47b78069f742d70310 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 8 Jun 2023 10:20:02 +0000 Subject: [PATCH] Bug 33581: Add sample patrons to patch and some hints * Adds sample patrons to the new dependency checking JS * Adds a hind "requires sample libraries" to sample patrons and sample holidays. To test: * Build CSS (yarn build) * Veriy the checkbox for sample patrons works like the sample holidays one * Verify the hint shows up as intended Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi (cherry picked from commit b2f5c9362138189509f09b61c8e18c2a844b432e) Signed-off-by: Martin Renvoize (cherry picked from commit 5d6e378e01f7ba67081992a088223f8245a5a9e8) Signed-off-by: Matt Blenkinsop --- koha-tmpl/intranet-tmpl/prog/css/src/installer.scss | 5 +++++ .../intranet-tmpl/prog/en/modules/installer/step3.tt | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/installer.scss b/koha-tmpl/intranet-tmpl/prog/css/src/installer.scss index e823531d77..273183a3f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/installer.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/installer.scss @@ -242,3 +242,8 @@ span.breadcrumbs { .complete { color: green; } + +.hint { + color: #727272; + font-size: 90%; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt index ffd3d36672..85e264edb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -463,14 +463,16 @@ $( container ).find("input").prop("checked", state); $( container ).find(".selectall,.deselectall").toggle(); }); - function update_sample_libraries_holidays(){ + let required_text = _("(requires sample libraries)"); + $("#sample_libraries_holidays, #sample_patrons").parent().after(" "+required_text+""); + function update_sample_libraries_dependencies(){ let checked = $("#sample_libraries").prop("checked"); - $("#sample_libraries_holidays").prop("disabled", !checked); + $("#sample_libraries_holidays, #sample_patrons").prop("disabled", !checked); if (!checked) { - $("#sample_libraries_holidays").prop("checked", false); + $("#sample_libraries_holidays, #sample_patrons").prop("checked", false); } }; - $("#sample_libraries").on("change", update_sample_libraries_holidays); + $("#sample_libraries").on("change", update_sample_libraries_dependencies); $("#sample_libraries").change(); }); -- 2.39.5