2026-06-09 23:54:38 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
2026-06-20 13:14:41 +01:00
|
|
|
<h2>{{ _('Edit Non-Loanable Device') }}</h2>
|
2026-06-09 23:54:38 +01:00
|
|
|
|
|
|
|
|
<form method="POST" action="/edit_non_loanable_device/{{ device.id }}">
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="device_type">{{ _('Device Type') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<select id="device_type" name="device_type" required>
|
2026-06-20 13:14:41 +01:00
|
|
|
<option value="projector" {% if device.device_type == 'projector' %}selected{% endif %}>{{ _('Projector') }}</option>
|
|
|
|
|
<option value="monitor" {% if device.device_type == 'monitor' %}selected{% endif %}>{{ _('Monitor') }}</option>
|
|
|
|
|
<option value="laptop" {% if device.device_type == 'laptop' %}selected{% endif %}>{{ _('Laptop (non-loanable)') }}</option>
|
|
|
|
|
<option value="printer" {% if device.device_type == 'printer' %}selected{% endif %}>{{ _('Printer') }}</option>
|
|
|
|
|
<option value="camera" {% if device.device_type == 'camera' %}selected{% endif %}>{{ _('Camera') }}</option>
|
|
|
|
|
<option value="audio" {% if device.device_type == 'audio' %}selected{% endif %}>{{ _('Audio Equipment') }}</option>
|
|
|
|
|
<option value="network" {% if device.device_type == 'network' %}selected{% endif %}>{{ _('Network Equipment') }}</option>
|
|
|
|
|
<option value="other" {% if device.device_type == 'other' %}selected{% endif %}>{{ _('Other') }}</option>
|
2026-06-09 23:54:38 +01:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="brand">{{ _('Brand') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<input type="text" id="brand" name="brand" value="{{ device.brand }}" required>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="model">{{ _('Model') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<input type="text" id="model" name="model" value="{{ device.model }}" required>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="serial_number">{{ _('Serial Number') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<input type="text" id="serial_number" name="serial_number" value="{{ device.serial_number }}" required>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="location">{{ _('Location') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<input type="text" id="location" name="location" value="{{ device.location or '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="status">{{ _('Status') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<select id="status" name="status" required>
|
2026-06-20 13:14:41 +01:00
|
|
|
<option value="available" {% if device.status == 'available' %}selected{% endif %}>{{ _('Available') }}</option>
|
|
|
|
|
<option value="in_use" {% if device.status == 'in_use' %}selected{% endif %}>{{ _('In Use') }}</option>
|
|
|
|
|
<option value="maintenance" {% if device.status == 'maintenance' %}selected{% endif %}>{{ _('Maintenance') }}</option>
|
|
|
|
|
<option value="retired" {% if device.status == 'retired' %}selected{% endif %}>{{ _('Retired') }}</option>
|
2026-06-09 23:54:38 +01:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="purchase_date">{{ _('Purchase Date') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<input type="date" id="purchase_date" name="purchase_date" value="{{ device.purchase_date or '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="purchase_cost">{{ _('Purchase Cost') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<input type="number" id="purchase_cost" name="purchase_cost" step="0.01" value="{{ device.purchase_cost or '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<label for="notes">{{ _('Notes') }}:</label>
|
2026-06-09 23:54:38 +01:00
|
|
|
<textarea id="notes" name="notes">{{ device.notes or '' }}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2026-06-20 13:14:41 +01:00
|
|
|
<button type="submit" class="btn">{{ _('Update Device') }}</button>
|
|
|
|
|
<a href="/non_loanable_devices" class="btn">{{ _('Cancel') }}</a>
|
2026-06-09 23:54:38 +01:00
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{% endblock %}
|