GestionTablets/templates/edit_non_loanable_device.html

72 lines
3.5 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% block content %}
<h2>Edit Non-Loanable Device</h2>
<form method="POST" action="/edit_non_loanable_device/{{ device.id }}">
<div class="form-group">
<label for="device_type">Device Type:</label>
<select id="device_type" name="device_type" required>
<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>
</select>
</div>
<div class="form-group">
<label for="brand">Brand:</label>
<input type="text" id="brand" name="brand" value="{{ device.brand }}" required>
</div>
<div class="form-group">
<label for="model">Model:</label>
<input type="text" id="model" name="model" value="{{ device.model }}" required>
</div>
<div class="form-group">
<label for="serial_number">Serial Number:</label>
<input type="text" id="serial_number" name="serial_number" value="{{ device.serial_number }}" required>
</div>
<div class="form-group">
<label for="location">Location:</label>
<input type="text" id="location" name="location" value="{{ device.location or '' }}">
</div>
<div class="form-group">
<label for="status">Status:</label>
<select id="status" name="status" required>
<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>
</select>
</div>
<div class="form-group">
<label for="purchase_date">Purchase Date:</label>
<input type="date" id="purchase_date" name="purchase_date" value="{{ device.purchase_date or '' }}">
</div>
<div class="form-group">
<label for="purchase_cost">Purchase Cost:</label>
<input type="number" id="purchase_cost" name="purchase_cost" step="0.01" value="{{ device.purchase_cost or '' }}">
</div>
<div class="form-group">
<label for="notes">Notes:</label>
<textarea id="notes" name="notes">{{ device.notes or '' }}</textarea>
</div>
<div class="form-group">
<button type="submit" class="btn">Update Device</button>
<a href="/non_loanable_devices" class="btn">Cancel</a>
</div>
</form>
{% endblock %}