hid freebie image
This commit is contained in:
parent
c0563306e3
commit
9e53d6b374
@ -20,7 +20,7 @@
|
||||
if (e.result.type == 'success') {
|
||||
toast.success('Website configuration successfully updated!');
|
||||
} else {
|
||||
console.log(e.result)
|
||||
console.log(e.result);
|
||||
toast.error('Error when updating website.');
|
||||
}
|
||||
}
|
||||
@ -71,9 +71,9 @@
|
||||
<div class="w-full max-w-7xl">
|
||||
<form method="post" use:enhance enctype="multipart/form-data">
|
||||
<input type="text" value={data.blog_info.id} name="id" readonly class="hidden" />
|
||||
<div class="grid grid-cols-2 gap-16">
|
||||
<div class="grid grid-cols-1 gap-16 md:grid-cols-2 md:grid-rows-1">
|
||||
<div>
|
||||
<h2 class="font-bold text-2xl mb-4">Basics</h2>
|
||||
<h2 class="mb-4 text-2xl font-bold">Basics</h2>
|
||||
<Form.Field {form} name="name">
|
||||
<Form.Control let:attrs>
|
||||
<Form.Label>Blog name</Form.Label>
|
||||
@ -147,14 +147,19 @@
|
||||
<Input {...attrs} bind:value={$formData.domain} />
|
||||
</Form.Control>
|
||||
{#if data.blog_info.subdomain_slug}
|
||||
<Form.Description>You can also access your website at <a href="http://{data.blog_info.subdomain_slug}.{config.sites_url}" class="underline font-semibold">{data.blog_info.subdomain_slug}.{config.sites_url}</a></Form.Description>
|
||||
|
||||
<Form.Description
|
||||
>You can also access your website at <a
|
||||
href="http://{data.blog_info.subdomain_slug}.{config.sites_url}"
|
||||
class="font-semibold underline"
|
||||
>{data.blog_info.subdomain_slug}.{config.sites_url}</a
|
||||
></Form.Description
|
||||
>
|
||||
{/if}
|
||||
<Form.FieldErrors />
|
||||
</Form.Field>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="font-bold text-2xl mb-4">Freebies</h2>
|
||||
<h2 class="mb-4 text-2xl font-bold">Freebies</h2>
|
||||
<Form.Field {form} name="use_freebie">
|
||||
<Form.Control let:attrs>
|
||||
<Form.Label class="text-right">Send freebie</Form.Label>
|
||||
@ -198,6 +203,7 @@
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
</Form.Field>
|
||||
<div class="hidden">
|
||||
<Form.Field {form} name="freebie_image_url">
|
||||
<Form.Control let:attrs>
|
||||
<Form.Label class="text-right">Freebie image</Form.Label>
|
||||
@ -211,23 +217,29 @@
|
||||
)}
|
||||
bind:disabled={disable_freebies}
|
||||
/>
|
||||
<Input {...attrs} class="hidden" bind:value={$formData.freebie_image_url} readonly />
|
||||
</div>
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
</Form.Field>
|
||||
<Form.Field {form} name="freebie_text">
|
||||
<Form.Control let:attrs>
|
||||
<Form.Label class="text-right">Freebie text</Form.Label>
|
||||
<div class="flex items-center justify-start">
|
||||
<Textarea
|
||||
<Input
|
||||
{...attrs}
|
||||
bind:value={$formData.freebie_text}
|
||||
class="hidden"
|
||||
bind:value={$formData.freebie_image_url}
|
||||
readonly
|
||||
/>
|
||||
</div>
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
<Form.Description>The text displayed next to the signup form on your blog.</Form.Description>
|
||||
</Form.Field>
|
||||
</div>
|
||||
|
||||
<Form.Field {form} name="freebie_text">
|
||||
<Form.Control let:attrs>
|
||||
<Form.Label class="text-right">Freebie text</Form.Label>
|
||||
<div class="flex items-center justify-start">
|
||||
<Textarea {...attrs} bind:value={$formData.freebie_text} />
|
||||
</div>
|
||||
</Form.Control>
|
||||
<Form.FieldErrors />
|
||||
<Form.Description
|
||||
>The text displayed next to the signup form on your blog.</Form.Description
|
||||
>
|
||||
</Form.Field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@ export const schema = z.object({
|
||||
secondary_color_hex: z.string().length(7),
|
||||
text_color_hex: z.string().length(7),
|
||||
domain: z.string().optional(),
|
||||
use_freebie: z.boolean(),
|
||||
use_freebie: z.boolean().default(false),
|
||||
freebie_name: z.string().optional(),
|
||||
freebie_url: z.string().optional(),
|
||||
freebie_image_url: z.string().optional(),
|
||||
|
Loading…
Reference in New Issue
Block a user