- Add _() translation function to add_tablet.html, add_user.html, loan_tablet.html - Add _() translation function to add_non_loanable_device.html, edit_non_loanable_device.html - Add _() translation function to history.html, non_loanable_devices.html, project_management.html - Update app.py to use cookie-based language persistence with 1-year expiry - Add /set_language endpoint to handle language switching with cookie + session - Update language switcher in base.html to use new endpoint - Set Spanish (es) as default language for internal app - Import make_response and session from Flask
30 lines
993 B
HTML
30 lines
993 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h2>{{ _('Add New Tablet') }}</h2>
|
|
<form method="POST" action="/add_tablet">
|
|
<div class="form-group">
|
|
<label for="brand">{{ _('Brand') }}:</label>
|
|
<input type="text" id="brand" name="brand" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="model">{{ _('Model') }}:</label>
|
|
<input type="text" id="model" name="model" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="serial_number">{{ _('Serial Number') }}:</label>
|
|
<input type="text" id="serial_number" name="serial_number" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="notes">{{ _('Notes') }}:</label>
|
|
<textarea id="notes" name="notes"></textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<button type="submit" class="btn">{{ _('Add Tablet') }}</button>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|