Compare commits
2 Commits
51ed8da26c
...
c207da0462
| Author | SHA1 | Date |
|---|---|---|
|
|
c207da0462 | |
|
|
8df1c6ddc1 |
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
import { untrack } from "svelte";
|
||||
import { enhance } from "$app/forms";
|
||||
import { page } from "$app/state"
|
||||
import { page } from "$app/state";
|
||||
import { base } from "$app/paths";
|
||||
|
||||
import type { RecordEntry } from "$lib/db_types"
|
||||
import { MONTHS, toInt, padInt, parseDate, calculateDuration, weekday_of } from "$lib/util";
|
||||
|
|
@ -263,13 +264,13 @@
|
|||
<tr>
|
||||
<td colspan="2" class="doc_action">
|
||||
{#if document == null}
|
||||
<form id="form_create_rec" method="POST" action="/dokumente?/create_record">
|
||||
<form id="form_create_rec" method="POST" action="{base}/dokumente?/create_record">
|
||||
<input type="hidden" name="month" value={month + 1} />
|
||||
<input type="hidden" name="year" value={year} />
|
||||
<button type="submit">Stundenliste erstellen</button>
|
||||
</form>
|
||||
{:else}
|
||||
<form id="form_download" method="GET" action={`/dokumente/${document.path}`} target="_blank">
|
||||
<form id="form_download" method="GET" action={`${base}/dokumente/${document.path}`} target="_blank">
|
||||
<input type="hidden" name="month" value={month + 1} />
|
||||
<input type="hidden" name="year" value={year} />
|
||||
<button type="submit">Download</button>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { PageProps } from "./$types";
|
||||
import { enhance } from "$app/forms";
|
||||
|
||||
let { form }: PageProps = $props();
|
||||
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<h1>Login</h1>
|
||||
<form id="login" method="POST" action="?/login">
|
||||
<form id="login" method="POST" action="?/login" use:enhance={({formElement}) => { formElement.reset() }}>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
@ -15,7 +17,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><label for="password">Passwort:</label></td>
|
||||
<td><input type="password" id="password" name="password" required /></td>
|
||||
<td><input type="password" id="password" name="password" required /></td> <!-- form.password should never be defined -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><button type="submit">Login</button></td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue