zadmin/templates/host/create.html

35 lines
2.8 KiB
HTML

{{ define "content" }}
<div class="py-8 px-4 mx-auto max-w-2xl lg:py-16" id="form-outer">
<form action="#">
<div class="grid gap-4 sm:grid-cols-2 sm:gap-6">
<div class="sm:col-span-2">
<label for="name" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Name</label>
<input type="text" name="name" id="name" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="Type host name" required="">
</div>
<div>
<label for="os_type" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">OS Type</label>
<select name="os_type" id="os_type" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-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-primary-500 dark:focus:border-primary-500">
<option selected="">Select OS Type</option>
<option value="Linux">Linux</option>
<option value="Windows">Windows</option>
</select>
</div>
<div>
<label for="os_arch" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">OS Arch</label>
<select name="os_arch" id="os_arch" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-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-primary-500 dark:focus:border-primary-500">
<option selected="">Select OS Arch</option>
<option value="amd64">amd64</option>
</select>
</div>
<div class="sm:col-span-2">
<label for="description" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label>
<textarea name="description" id="description" rows="3" class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="Host description here"></textarea>
</div>
</div>
<button hx-post="/host" hx-target="#form-outer" hx-target="innerHTML" class="inline-flex items-center px-5 py-2.5 mt-4 sm:mt-6 text-sm font-medium text-center text-white bg-primary-700 rounded-lg focus:ring-4 focus:ring-primary-200 dark:focus:ring-primary-900 hover:bg-primary-800">
Add Host
</button>
</form>
</div>
{{ end }}