From 4d12ca57224784aa3667dd3e299df926f4f0c5f9 Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Thu, 6 Mar 2025 10:59:34 -0500
Subject: [PATCH] i2ptunnel: Change EncType selection from a radio to a
 dropdown

match the SigType selection style, and prep for PQ
add title to default
---
 apps/i2ptunnel/jsp/editClient.jsi | 20 ++++++++------------
 apps/i2ptunnel/jsp/editServer.jsi | 20 ++++++++------------
 2 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/apps/i2ptunnel/jsp/editClient.jsi b/apps/i2ptunnel/jsp/editClient.jsi
index 3c70a586ea..667a670147 100644
--- a/apps/i2ptunnel/jsp/editClient.jsi
+++ b/apps/i2ptunnel/jsp/editClient.jsi
@@ -611,18 +611,14 @@
             </th>
         </tr><tr>
             <td colspan="2">
-                <span class="multiOption" <%=ehdisabled%>>
-                    <label><input value="0" type="radio" id="startOnLoad" name="encType" <%=((has0 && !has4) ? " checked=\"checked\"" : edisabled)%> class="tickbox" />
-                    ElGamal-2048</label>
-                </span>
-                <span class="multiOption" <%=ehdisabled%>>
-                    <label><input value="4" type="radio" id="startOnLoad" name="encType" <%=((has4 && !has0) ? " checked=\"checked\"" : edisabled)%> class="tickbox" />
-                    ECIES-X25519</label>
-                </span>
-                <span class="multiOption" <%=ehdisabled%>>
-                    <label><input value="4,0" type="radio" id="startOnLoad" name="encType" <%=((has0 && has4) ? " checked=\"checked\"" : edisabled)%> class="tickbox" />
-                    <%=intl._t("Both encryption types")%></label>
-                </span>
+                <select id="encType" name="encType" class="selectbox" <%=ehdisabled%>>
+                    <option value="0" <%=((has0 && !has4) ? " selected=\"selected\"" : edisabled)%> >
+                    ElGamal-2048</option>
+                    <option title="<%=intl._t("This is the default, recommended option")%>" value="4" <%=((has4 && !has0) ? " selected=\"selected\"" : edisabled)%> >
+                    ECIES-X25519</option>
+                    <option value="4,0" <%=((has0 && has4) ? " selected=\"selected\"" : edisabled)%> >
+                    <%=intl._t("Both encryption types")%></option>
+                </select>
             </td>
         </tr>
 <%
diff --git a/apps/i2ptunnel/jsp/editServer.jsi b/apps/i2ptunnel/jsp/editServer.jsi
index ea7ae476cc..4bb94a5705 100644
--- a/apps/i2ptunnel/jsp/editServer.jsi
+++ b/apps/i2ptunnel/jsp/editServer.jsi
@@ -684,18 +684,14 @@
             </th>
         </tr><tr>
             <td colspan="2">
-                <span class="multiOption" <%=ehdisabled%>>
-                    <label><input value="0" type="radio" id="startOnLoad" name="encType" <%=((has0 && !has4) ? " checked=\"checked\"" : edisabled)%> class="tickbox" />
-                    ElGamal-2048</label>
-                </span>
-                <span class="multiOption" <%=ehdisabled%>>
-                    <label><input value="4" type="radio" id="startOnLoad" name="encType" <%=((has4 && !has0) ? " checked=\"checked\"" : edisabled)%> class="tickbox" />
-                    ECIES-X25519</label>
-                </span>
-                <span class="multiOption" <%=ehdisabled%>>
-                    <label><input value="4,0" type="radio" id="startOnLoad" name="encType" <%=((has0 && has4) ? " checked=\"checked\"" : edisabled)%> class="tickbox" />
-                    <%=intl._t("Both encryption types")%></label>
-                </span>
+                <select id="encType" name="encType" class="selectbox" <%=ehdisabled%>>
+                    <option value="0" <%=((has0 && !has4) ? " selected=\"selected\"" : edisabled)%> >
+                    ElGamal-2048</option>
+                    <option title="<%=intl._t("This is the default, recommended option")%>" value="4" <%=((has4 && !has0) ? " selected=\"selected\"" : edisabled)%> >
+                    ECIES-X25519</option>
+                    <option value="4,0" <%=((has0 && has4) ? " selected=\"selected\"" : edisabled)%> >
+                    <%=intl._t("Both encryption types")%></option>
+                </select>
             </td>
         </tr>
 <%
-- 
GitLab