Hide toggle for now

This commit is contained in:
Test User 2026-03-30 23:13:00 +00:00
parent 387714a221
commit f2f4682fa1

View file

@ -357,26 +357,13 @@ def handle_add_form(msg="", action_type="index"):
f"<p>Add a site to your index</p>" f"<p>Add a site to your index</p>"
f'<form method="post" action="/add">' f'<form method="post" action="/add">'
f'{_csrf_field()}' f'{_csrf_field()}'
f'<input type="radio" name="input_type" value="url" id="type_url" checked onchange="toggleInput()">' f'<input name="url" placeholder="https://example.com" size="50"><br>'
f'<label for="type_url">URL</label>'
f'<input type="radio" name="input_type" value="hash" id="type_hash" onchange="toggleInput()">'
f'<label for="type_hash">Reticulum Hash</label>'
f'<br><br>'
f'<input name="url" id="url_input" placeholder="https://example.com" size="50"><br>'
f'<input name="reticulum_dest" id="hash_input" placeholder="reticulum destination hash (32 hex chars)" size="50" style="display:none"><br>'
f'<input name="note" placeholder="why are you saving this? (optional)" size="50"><br><br>' f'<input name="note" placeholder="why are you saving this? (optional)" size="50"><br><br>'
f'<input name="tags" placeholder="tags (comma-separated, e.g. solarpunk, mesh)" size="50"><br><br>' f'<input name="tags" placeholder="tags (comma-separated, e.g. solarpunk, mesh)" size="50"><br><br>'
f'<button type="submit">index</button>' f'<button type="submit">index</button>'
f"</form>" f"</form>"
f"<p>{msg}</p>" f"<p>{msg}</p>"
f'<a href="/">back</a>' f'<a href="/">back</a>'
f'<script>'
f'function toggleInput() {{'
f' var isUrl = document.getElementById("type_url").checked;'
f' document.getElementById("url_input").style.display = isUrl ? "block" : "none";'
f' document.getElementById("hash_input").style.display = isUrl ? "none" : "block";'
f'}}'
f'</script>'
) )