From a2a2314856dacff802ea32913fd3d2285ac11320 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 9 Aug 2024 16:05:55 +0000 Subject: [PATCH] Bug 37607: Only default to manual form if we are editing This patch fixes an issue where the form to add a provder would automatically default to the manual form. This patch prevents this behaviour and restores the intended functionality. Test plan: 1) Don't apply the patch 2) In ERM, click to add a new provider 3) Type something in the provider name search box 4) The input will change from a select to a text input and the button next to it will now say "Create from registry" 5) Apply patch 6) Yarn build and hard refresh the browser 7) Repeat steps 1-3, the form should work as intended and return results in the select box Signed-off-by: Paul Derscheid Signed-off-by: Katrin Fischer (cherry picked from commit a73cafda2daf020d41a86e8e80c5da50307ff277) Signed-off-by: Lucas Gass --- .../vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue index b205956d2d..7d4e30afb9 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersFormAdd.vue @@ -466,7 +466,8 @@ export default { r => r.report_id === report.value ) ) - } else { + } + if (caller === "edit" && registry_data.length === 0) { this.manual_form = true } this.searching = false -- 2.39.5