Compare commits

..

No commits in common. "c207da0462f5b53858fd3430b4e477686be55531" and "51ed8da26c0f4e21ffda02eaee1fe083460af8ef" have entirely different histories.

2 changed files with 5 additions and 8 deletions

View File

@ -3,8 +3,7 @@
import { untrack } from "svelte";
import { enhance } from "$app/forms";
import { page } from "$app/state";
import { base } from "$app/paths";
import { page } from "$app/state"
import type { RecordEntry } from "$lib/db_types"
import { MONTHS, toInt, padInt, parseDate, calculateDuration, weekday_of } from "$lib/util";
@ -264,13 +263,13 @@
<tr>
<td colspan="2" class="doc_action">
{#if document == null}
<form id="form_create_rec" method="POST" action="{base}/dokumente?/create_record">
<form id="form_create_rec" method="POST" action="/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={`${base}/dokumente/${document.path}`} target="_blank">
<form id="form_download" method="GET" action={`/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>

View File

@ -1,14 +1,12 @@
<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" use:enhance={({formElement}) => { formElement.reset() }}>
<form id="login" method="POST" action="?/login">
<table>
<tbody>
<tr>
@ -17,7 +15,7 @@
</tr>
<tr>
<td><label for="password">Passwort:</label></td>
<td><input type="password" id="password" name="password" required /></td> <!-- form.password should never be defined -->
<td><input type="password" id="password" name="password" required /></td>
</tr>
<tr>
<td colspan="2"><button type="submit">Login</button></td>