parent
634f7e41e2
commit
f493b47320
@ -0,0 +1,8 @@
|
||||
<div hx-target="this" hx-swap="outerHTML">
|
||||
<label for="content" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Content</label>
|
||||
<textarea id="content" name="content" hx-post="/htmx/validation/create-content/" rows="4" class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-[#3b82f6] focus:border-[#3b82f6] dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-[#3b82f6] dark:focus:border-[#3b82f6]" placeholder="Write article here"
|
||||
{{#if error}}aria-invalid="true"{{/if}}>{{ content }}</textarea>
|
||||
{{#if error}}
|
||||
<div class='text-sm font-bold leading-tight tracking-tight text-red-600 mt-2'>{{ error }}</div>
|
||||
{{/if}}
|
||||
</div>
|
@ -0,0 +1,7 @@
|
||||
<div hx-target="this" hx-swap="outerHTML">
|
||||
<label for="title" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Title</label>
|
||||
<input type="text" name="title" id="title" hx-post="/htmx/validation/create-title/" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-[#2563eb] focus:border-[#2563eb] block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-[#3b82f6] dark:focus:border-[#3b82f6]" placeholder="Type article title" required="" {{#if error}}aria-invalid="true"{{/if}} value="{{ title }}">
|
||||
{{#if error}}
|
||||
<div class='text-sm font-bold leading-tight tracking-tight text-red-600 mt-2'>{{ error }}</div>
|
||||
{{/if}}
|
||||
</div>
|
Loading…
Reference in new issue