159 lines
8.8 KiB
HTML
159 lines
8.8 KiB
HTML
{{ template "header.html" . }}
|
|
|
|
<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
|
|
<div class="sm:mx-auto sm:w-full sm:max-w-sm">
|
|
<img class="mx-auto h-10 w-auto" src="/static/img/logo-black.png" alt="Your Company">
|
|
<h2 class="mt-10 text-center text-2xl/9 font-bold tracking-tight text-gray-900">Add an Item</h2>
|
|
</div>
|
|
|
|
|
|
<div class="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
|
|
<form class="space-y-6" action="#" method="POST" enctype="multipart/form-data">
|
|
<div>
|
|
<label for="name" class="block text-sm/6 font-medium text-gray-900">Name</label>
|
|
<div class="mt-2">
|
|
<input type="text" name="name" id="name" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="abstract" class="block text-sm/6 font-medium text-gray-900">Abstract</label>
|
|
<div class="mt-2">
|
|
<input type="text" name="abstract" id="abstract" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="description" class="block text-sm/6 font-medium text-gray-900" for="passwordConfirmation">Description</label>
|
|
<textarea id="description" name="description" type="textarea" class="block w-full px-4 py-2 mt-2 text-gray-700 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring"></textarea>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label class="block text-sm/6 text-gray-900">Select Categories</label>
|
|
<div class="space-y-2">
|
|
{{ range .data.tags }}
|
|
<label class="flex text-sm/6 items-center">
|
|
<input type="checkbox" class="form-checkbox h-4 w-4 text-gray-900" value="{{ .ID }}" name="tags[]">
|
|
<span class="ml-2 text-sm/6 text-gray-900">{{ .Name }}</span>
|
|
</label>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
|
|
<!--
|
|
<div class="mb-4">
|
|
<label for="tags" class="block text-gray-700">Select Tags</label>
|
|
<select id="tags" name="tags" multiple class="mt-1 block w-full border border-gray-300 rounded-md p-2 focus:outline-none focus:ring focus:ring-blue-500">
|
|
<option value="tag1">Tag 1</option>
|
|
<option value="tag2">Tag 2</option>
|
|
<option value="tag3">Tag 3</option>
|
|
<option value="tag4">Tag 4</option>
|
|
<option value="tag5">Tag 5</option>
|
|
</select>
|
|
<p class="mt-1 text-gray-500 text-sm">Hold down the Ctrl (Windows) or Command (Mac) button to select multiple options.</p>
|
|
</div>
|
|
-->
|
|
|
|
<div>
|
|
<input type="hidden" name="category" value="Zine" required>
|
|
<input type="hidden" id="variant-name1" name="variant-name[]" value="B/W" required>
|
|
<div class="flex items-center justify-between">
|
|
<label for="variant-value1" class="block text-sm/6 font-medium text-gray-900">Price B/W</label>
|
|
</div>
|
|
<div class="mt-2">
|
|
<input type="number" name="variant-value[]" id="variant-value1" step="0.01" min="0.00" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<input type="hidden" id="variant-name2" name="variant-name[]" value="Colored" required>
|
|
<div class="flex items-center justify-between">
|
|
<label for="variant-value2" class="block text-sm/6 font-medium text-gray-900">Price Colored</label>
|
|
</div>
|
|
<div class="mt-2">
|
|
<input type="number" name="variant-value[]" id="variant-value2" step="0.01" min="0.00" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-900">
|
|
Image
|
|
</label>
|
|
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md">
|
|
<div class="space-y-1 text-center">
|
|
<svg class="mx-auto h-12 w-12 text-gray-900" stroke="currentColor" fill="none" viewBox="0 0 48 48" aria-hidden="true">
|
|
<path d="M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
</svg>
|
|
<div class="flex text-sm text-gray-600">
|
|
<label for="image-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-indigo-600 hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500">
|
|
<span class="">Upload a file</span>
|
|
<input id="image-upload" name="image" type="file" accept="image/*" class="sr-only">
|
|
</label>
|
|
<p class="pl-1 text-gray-900">or drag and drop</p>
|
|
</div>
|
|
<p class="text-xs text-gray-900">
|
|
PNG, JPG, GIF up to 10MB
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-900">
|
|
PDF
|
|
</label>
|
|
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md">
|
|
<div class="space-y-1 text-center">
|
|
<svg class="mx-auto h-12 w-12 text-gray-900" stroke="currentColor" fill="none" viewBox="0 0 48 48" aria-hidden="true">
|
|
<path d="M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
</svg>
|
|
<div class="flex text-sm text-gray-600">
|
|
<label for="pdf-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-indigo-600 hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500">
|
|
<span class="">Upload a file</span>
|
|
<input id="pdf-upload" name="pdf" type="file" accept="application/pdf" class="sr-only">
|
|
</label>
|
|
<p class="pl-1 text-gray-900">or drag and drop</p>
|
|
</div>
|
|
<p class="text-xs text-gray-900">
|
|
PDF up to 50MB
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<label class="block text-sm font-medium text-gray-900">
|
|
Print Mode
|
|
</label>
|
|
<select name="print-mode" required class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
<option selected value="CreateBooklet">Create Booklet</option>
|
|
<option value="LongEdge">Long Edge</option>
|
|
<option value="ShortEdge">Short Edge</option>
|
|
<option value="CreateBookletA5">CreateBooklet A5</option>
|
|
<option value="LongEdgeA5">Long Edge A5</option>
|
|
<option value="ShortEdgeA5">Short Edge A5</option>
|
|
<option value="TriFold">Tri-Fold (Flyer)</option>
|
|
</select>
|
|
|
|
|
|
<p class="text-sm">Choose 'Create Booklet' if its just a normal PDF (not converted to booklet already)</p>
|
|
|
|
<p class="mt-10 text-center text-sm/6 text-red-500">
|
|
{{ .data.error }}
|
|
</p>
|
|
<p class="mt-10 text-center text-sm/6 text-green-500">
|
|
{{ .data.success }}
|
|
</p>
|
|
|
|
|
|
<div>
|
|
<button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm/6 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Add Item</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{{ template "footer.html" . }}
|