fix checkbox layout: exclude from full-width, flex label

This commit is contained in:
lichenblankie 2026-06-05 02:32:33 +00:00
parent 9a08caea63
commit a69a7a9c01

View file

@ -19,9 +19,11 @@ def esc(s):
FORUM_CSS = """ FORUM_CSS = """
<style> <style>
.forum-form { max-width: 500px; } .forum-form { max-width: 500px; }
.forum-form input, .forum-form textarea { width: 100%; box-sizing: border-box; padding: 6px; margin-bottom: 8px; } .forum-form input:not([type=checkbox]):not([type=radio]), .forum-form textarea { width: 100%; box-sizing: border-box; padding: 6px; margin-bottom: 8px; }
.forum-form input[type=checkbox] { width: auto; margin: 0; }
.forum-form button { padding: 6px 16px; } .forum-form button { padding: 6px 16px; }
.forum-form label { display: block; margin-bottom: 8px; } .forum-form label:not(.checkbox-label) { display: block; margin-bottom: 8px; }
.forum-form label.checkbox-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.forum-form small { display: block; margin-bottom: 8px; } .forum-form small { display: block; margin-bottom: 8px; }
</style> </style>
""" """
@ -533,14 +535,14 @@ class ForumHandlers:
f"<h2>auto-discovery</h2>" f"<h2>auto-discovery</h2>"
f'<form class="forum-form" method="post" action="/forum/auto_discover">' f'<form class="forum-form" method="post" action="/forum/auto_discover">'
f'{self._csrf_field()}' f'{self._csrf_field()}'
f'<label><input type="checkbox" name="enabled" value="1"{auto_discover_checked}>' f'<label class="checkbox-label"><input type="checkbox" name="enabled" value="1"{auto_discover_checked}>'
f" automatically discover other forum instances on the mesh</label>" f" automatically discover other forum instances on the mesh</label>"
f'<button>save</button>' f'<button>save</button>'
f"</form>" f"</form>"
f"<h2>auto-sync</h2>" f"<h2>auto-sync</h2>"
f'<form class="forum-form" method="post" action="/forum/auto_sync">' f'<form class="forum-form" method="post" action="/forum/auto_sync">'
f'{self._csrf_field()}' f'{self._csrf_field()}'
f'<label><input type="checkbox" name="enabled" value="1"{auto_sync_checked}>' f'<label class="checkbox-label"><input type="checkbox" name="enabled" value="1"{auto_sync_checked}>'
f" automatically sync content every 5 minutes</label>" f" automatically sync content every 5 minutes</label>"
f'<button>save</button>' f'<button>save</button>'
f"</form>" f"</form>"