Move form to cardbody instead of classing

This commit is contained in:
Christoph Kluge 2025-06-06 16:17:42 +02:00
parent f946e7e6ab
commit c22d869aa7

View File

@ -3,7 +3,7 @@
--> -->
<script> <script>
import { Row, Col, Card, CardTitle, Button} from "@sveltestrap/sveltestrap"; import { Row, Col, Card, CardTitle, CardBody, Button} from "@sveltestrap/sveltestrap";
import { fade } from "svelte/transition"; import { fade } from "svelte/transition";
export let config; export let config;
@ -43,9 +43,7 @@
<Col> <Col>
<Card class="h-100"> <Card class="h-100">
<!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. --> <!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. -->
<CardTitle <CardTitle class="m-3 d-flex align-items-center">
style="margin-bottom: 1em; display: flex; align-items: center;"
>
<div>Node List Paging Type</div> <div>Node List Paging Type</div>
{#if displayMessage && message.target == "npag"}<div {#if displayMessage && message.target == "npag"}<div
style="margin-left: auto; font-size: 0.9em;" style="margin-left: auto; font-size: 0.9em;"
@ -55,33 +53,34 @@
> >
</div>{/if} </div>{/if}
</CardTitle> </CardTitle>
<form <CardBody>
id="node-paging-form" <form
method="post" id="node-paging-form"
action="/frontend/configuration/" method="post"
class="card-body" action="/frontend/configuration/"
on:submit|preventDefault={() => handleSettingSubmit("#node-paging-form", "npag")}> on:submit|preventDefault={() => handleSettingSubmit("#node-paging-form", "npag")}>
<input type="hidden" name="key" value="node_list_usePaging" /> <input type="hidden" name="key" value="node_list_usePaging" />
<div class="mb-3"> <div class="mb-3">
<div> <div>
{#if config?.node_list_usePaging} {#if config?.node_list_usePaging}
<input type="radio" id="nodes-true-checked" name="value" value="true" checked /> <input type="radio" id="nodes-true-checked" name="value" value="true" checked />
{:else} {:else}
<input type="radio" id="nodes-true" name="value" value="true" /> <input type="radio" id="nodes-true" name="value" value="true" />
{/if} {/if}
<label for="nodes-true">Paging with selectable count of nodes.</label> <label for="nodes-true">Paging with selectable count of nodes.</label>
</div>
<div>
{#if config?.node_list_usePaging}
<input type="radio" id="nodes-false" name="value" value="false" />
{:else}
<input type="radio" id="nodes-false-checked" name="value" value="false" checked />
{/if}
<label for="nodes-false">Continuous scroll iteratively adding 10 nodes.</label>
</div>
</div> </div>
<div> <Button color="primary" type="submit">Submit</Button>
{#if config?.node_list_usePaging} </form>
<input type="radio" id="nodes-false" name="value" value="false" /> </CardBody>
{:else}
<input type="radio" id="nodes-false-checked" name="value" value="false" checked />
{/if}
<label for="nodes-false">Continuous scroll iteratively adding 10 nodes.</label>
</div>
</div>
<Button color="primary" type="submit">Submit</Button>
</form>
</Card> </Card>
</Col> </Col>
</Row> </Row>