-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unregistration and preview message (#97)
Co-authored-by: Anton Lilleby <[email protected]>
- Loading branch information
Showing
5 changed files
with
37 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<script lang="ts"> | ||
import { dateHasPassed } from "$lib/utils/date.util"; | ||
import { Input, Button, ButtonGroup, Spinner } from "flowbite-svelte"; | ||
import { Input, Button, Spinner } from "flowbite-svelte"; | ||
import type { Event } from "$models/sanity.model"; | ||
export let event: Event; | ||
|
@@ -12,46 +12,38 @@ | |
|
||
{#if !dateHasPassed(event.deadline)} | ||
<form | ||
class="mt-20 flex flex-col gap-6" | ||
class="mt-20 flex flex-col gap-2" | ||
method="POST" | ||
action="?/submitUnregistrationExternal" | ||
use:enhance | ||
> | ||
<input type="text" name="subject" id="subject" class="hidden" /> | ||
|
||
<div | ||
class="mb-8 flex flex-col items-start justify-center rounded-lg border p-4 dark:border-gray-700 dark:bg-gray-800 sm:p-8" | ||
> | ||
<div class="flex flex-col items-center gap-5"> | ||
<div class="items-start-4 flex flex-col"> | ||
<h4 | ||
class="text-2xl font-bold leading-none tracking-tight text-gray-900 dark:text-white sm:text-2xl" | ||
> | ||
<h2 class="pb-4 text-base font-bold sm:text-xl">Ønsker du å melde deg av?</h2> | ||
</h4> | ||
<h2 id="unregistration" class="pb-4 text-base font-bold sm:text-xl"> | ||
Ønsker du å melde deg av? | ||
</h2> | ||
|
||
<ButtonGroup class="w-100"> | ||
<Input | ||
class="bg-white" | ||
type="text" | ||
placeholder="[email protected]" | ||
name="email" | ||
bind:value={$form.email} | ||
/> | ||
<Button class="w-48" type="submit" color="light" disabled={$delayed}> | ||
Meld meg av | ||
<span class="w-3"> | ||
{#if $delayed} | ||
<Spinner color="gray" class="ml-2 " size="4" /> | ||
{/if} | ||
</span> | ||
</Button> | ||
</ButtonGroup> | ||
{#if $errors.email} | ||
<p class="text-xs text-red-600">Fyll inn gyldig epost.</p> | ||
{/if} | ||
</div> | ||
<div class="grid grid-cols-1 gap-3 sm:grid-cols-2"> | ||
<Input | ||
class="bg-white" | ||
type="text" | ||
placeholder="[email protected]" | ||
name="email" | ||
bind:value={$form.email} | ||
/> | ||
<div class="flex items-center"> | ||
<Button pill color="dark" type="submit" disabled={$delayed}> | ||
<span class="ml-3">Meld meg av</span> | ||
<span class="w-3"> | ||
{#if $delayed} | ||
<Spinner color="gray" class="ml-2 " size="4" /> | ||
{/if} | ||
</span> | ||
</Button> | ||
</div> | ||
{#if $errors.email} | ||
<p class="text-xs text-red-600">Fyll inn gyldig epost.</p> | ||
{/if} | ||
</div> | ||
</form> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters