From 2d9a276932737030fade5529bffe58e218a12266 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Thu, 4 Jan 2024 22:55:06 +0000 Subject: [PATCH] JENKINS-TODO f:validateButton finds selected radio button --- war/src/main/webapp/scripts/hudson-behavior.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 678260fdad17b..3be3a4fddadb7 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -2708,8 +2708,13 @@ function validateButton(checkUrl, paramList, button) { paramList.split(",").forEach(function (name) { var p = findPreviousFormItem(button, name); if (p != null) { - if (p.type == "checkbox") { + if (p.type === "checkbox") { parameters[name] = p.checked; + } else if (p.type === "radio") { + while (p && !p.checked) { + p = findPreviousFormItem(p, name); + } + parameters[name] = p.value; } else { parameters[name] = p.value; }