fix retention input layout: inline label, override full-width
This commit is contained in:
parent
a69a7a9c01
commit
5e1e42fc86
1 changed files with 5 additions and 3 deletions
|
|
@ -21,9 +21,11 @@ FORUM_CSS = """
|
|||
.forum-form { max-width: 500px; }
|
||||
.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 label.inline-label input { width: auto; display: inline; }
|
||||
.forum-form button { padding: 6px 16px; }
|
||||
.forum-form label:not(.checkbox-label) { display: block; margin-bottom: 8px; }
|
||||
.forum-form label:not(.checkbox-label):not(.inline-label) { display: block; margin-bottom: 8px; }
|
||||
.forum-form label.checkbox-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
|
||||
.forum-form label.inline-label { display: inline; margin-bottom: 8px; }
|
||||
.forum-form small { display: block; margin-bottom: 8px; }
|
||||
</style>
|
||||
"""
|
||||
|
|
@ -549,8 +551,8 @@ class ForumHandlers:
|
|||
f"<h2>storage</h2>"
|
||||
f'<form class="forum-form" method="post" action="/forum/storage">'
|
||||
f'{self._csrf_field()}'
|
||||
f'<label>Keep threads for '
|
||||
f'<input name="retention_days" value="{esc(retention_days)}" size="4"> days</label>'
|
||||
f'<label class="inline-label">Keep threads for '
|
||||
f'<input name="retention_days" value="{esc(retention_days)}" size="5"> days</label>'
|
||||
f"<small>Older threads are pruned automatically (default: 30). Set to 0 to keep everything.</small>"
|
||||
f'<button>save</button>'
|
||||
f"</form>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue