diff src/choose_server.html.luan @ 12:3e2cb946d511

form handling
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 30 Oct 2023 14:59:45 -0600
parents 62dd23f0b549
children af2b95854072
line wrap: on
line diff
--- a/src/choose_server.html.luan	Sun Oct 29 22:39:31 2023 -0600
+++ b/src/choose_server.html.luan	Mon Oct 30 14:59:45 2023 -0600
@@ -86,13 +86,16 @@
 		local id = server.id or error()
 		local name = server.name or error()
 		local icon = server.icon
-		local url = "add_server.html?id="..id.."&name="..url_encode(name)
 		if icon ~= nil then
-			url = url.."&icon="..icon
+			local url = "add_server.html?id="..id.."&name="..url_encode(name).."&icon="..icon
+%>
+			<p><a href="<%=url%>"><%=html_encode(name)%></a></p>
+<%
+		else
+%>
+			<p><%=html_encode(name)%> (missing icon)</p>
+<%
 		end
-%>
-		<p><a href="<%=url%>"><%=html_encode(name)%></a></p>
-<%
 	end
 %>
 <%		footer() %>