From fe07ab8fc9719b08b0984aea3ce91842e9a68550 Mon Sep 17 00:00:00 2001 From: Florian Bontemps Date: Thu, 3 Mar 2022 14:48:50 +0000 Subject: [PATCH] Bug 30037: Select profile when staging notices This is a first draft for making the profile selection process easier. Currently, if you have multiple profiles set up when staging Notices on import, the defaut selection will always be "Do not use profile". With this patch, if at least one profile is already set up, the first one in the list (which should be the oldest) will be selected by default. To test: 1) You will need a Marc notice to stage. 2) If you don't have any, create multiple profiles for staging Marc recos for import (in the Tools section); two should be enough, they should have different settings. 3) See that "Do not use profile" is always preselected. 4) Apply patch. 5) Reload the page : Now, the first profile of your list should be preselected. 6) Confirm that manually picking a different profile still loads different settings 7) Sign off. Thanks-to: Didier Gautheron --- .../prog/en/modules/tools/stage-marc-import.tt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index 7877265d90..622f87fd04 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -482,12 +482,20 @@ .then(resolve, reject); }) .then(function(profiles) { + var setDefault = false; profiles.forEach(function(profile) { const opt = $("