2026-06-09 23:54:38 +01:00
{% extends "base.html" %}
{% block content %}
2026-06-24 15:53:55 +01:00
< div class = "max-w-2xl mx-auto space-y-6" >
{# Page Header #}
< div >
< h1 class = "text-2xl font-bold text-gray-900" > {{ _('Add Non-Loanable Device') }}< / h1 >
< p class = "text-gray-600 mt-1" > {{ _('Add a device that will be tracked in inventory but cannot be loaned to users (e.g., projectors, monitors, etc.)') }}< / p >
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
{# Device Form #}
< div class = "bg-white rounded-lg shadow overflow-hidden" >
< div class = "bg-cobalt-600 px-6 py-4" >
< h2 class = "text-lg font-semibold text-white" > {{ _('Device Information') }}< / h2 >
2026-06-09 23:54:38 +01:00
< / div >
2026-06-24 15:53:55 +01:00
< div class = "p-6" >
< form method = "POST" action = "/add_non_loanable_device" class = "space-y-6" >
< div >
< label for = "device_type" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Device Type') }} *< / label >
< select id = "device_type" name = "device_type" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500">
< option value = "" > {{ _('Select device type...') }}< / option >
< option value = "projector" > {{ _('Projector') }}< / option >
< option value = "monitor" > {{ _('Monitor') }}< / option >
< option value = "laptop" > {{ _('Laptop (non-loanable)') }}< / option >
< option value = "printer" > {{ _('Printer') }}< / option >
< option value = "camera" > {{ _('Camera') }}< / option >
< option value = "audio" > {{ _('Audio Equipment') }}< / option >
< option value = "network" > {{ _('Network Equipment') }}< / option >
< option value = "other" > {{ _('Other') }}< / option >
< / select >
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div >
< label for = "brand" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Brand') }} *< / label >
< input type = "text" id = "brand" name = "brand" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
placeholder="{{ _('e.g., Epson, Samsung, Dell') }}">
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div >
< label for = "model" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Model') }} *< / label >
< input type = "text" id = "model" name = "model" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
placeholder="{{ _('e.g., PowerLite 2250U, UltraSharp U2723QE') }}">
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div >
< label for = "serial_number" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Serial Number') }} *< / label >
< input type = "text" id = "serial_number" name = "serial_number" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
placeholder="{{ _('Unique serial number') }}">
< p class = "mt-1 text-sm text-gray-500" > {{ _('Each device must have a unique serial number') }}< / p >
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div >
< label for = "location" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Location') }}< / label >
< input type = "text" id = "location" name = "location"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
placeholder="{{ _('e.g., Room 101, Lab A, Storage') }}">
< p class = "mt-1 text-sm text-gray-500" > {{ _('Optional location where the device is stored') }}< / p >
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div class = "grid grid-cols-1 sm:grid-cols-2 gap-4" >
< div >
< label for = "purchase_date" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Purchase Date') }}< / label >
< input type = "date" id = "purchase_date" name = "purchase_date"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500">
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div >
< label for = "purchase_cost" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Purchase Cost') }}< / label >
< input type = "number" id = "purchase_cost" name = "purchase_cost" step = "0.01"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
placeholder="{{ _('0.00') }}">
< / div >
< / div >
< div >
< label for = "notes" class = "block text-sm font-medium text-gray-700 mb-1" > {{ _('Notes') }}< / label >
< textarea id = "notes" name = "notes" rows = "3"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-cobalt-500 focus:border-cobalt-500"
placeholder="{{ _('Optional notes about the device (condition, accessories, etc.)') }}">< / textarea >
< / div >
2026-06-09 23:54:38 +01:00
2026-06-24 15:53:55 +01:00
< div class = "flex justify-end gap-3 pt-4 border-t border-gray-200" >
< a href = "/non_loanable_devices"
class="inline-flex items-center gap-2 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors">
< svg class = "w-5 h-5" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
< path stroke-linecap = "round" stroke-linejoin = "round" stroke-width = "2" d = "M6 18L18 6M6 6l12 12" > < / path >
< / svg >
{{ _('Cancel') }}
< / a >
< button type = "submit"
class="inline-flex items-center gap-2 px-4 py-2 bg-cobalt-600 text-white rounded-lg hover:bg-cobalt-700 transition-colors">
< svg class = "w-5 h-5" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
< path stroke-linecap = "round" stroke-linejoin = "round" stroke-width = "2" d = "M12 6v6m0 0v6m0-6h6m-6 0H6" > < / path >
< / svg >
{{ _('Add Device') }}
< / button >
< / div >
< / form >
2026-06-09 23:54:38 +01:00
< / div >
2026-06-24 15:53:55 +01:00
< / div >
< / div >
2026-06-09 23:54:38 +01:00
{% endblock %}