Files
MobileManager/app/templates/form.html
Odysseus 9800c0bfb6
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 3m1s
Initial commit
2026-06-06 12:17:30 +00:00

33 lines
2.5 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="max-w-md mx-auto bg-white p-8 rounded-lg shadow-md">
<h2 class="text-2xl font-bold mb-6 text-center">{{ "Bearbeiten" if action == "edit" else "Neuer Vertrag" }}</h2>
<form action="{{ url_for('add_contract' if action == 'add' else 'edit_contract', contract_id=contract.id if action == 'edit' else '') }}" method="POST" class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700">Provider</label>
<input type="text" name="provider" value="{{ contract.provider if action == 'edit' else '' }}" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 border p-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Telefonnummer</label>
<input type="text" name="phone_number" value="{{ contract.phone_number if action == 'edit' else '' }}" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 border p-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700">PIN (Verschlüsselt)</label>
<input type="text" name="pin" value="{{ contract.pin if action == 'edit' else '' }}" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 border p-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700">PUK (Verschlüsselt)</label>
<input type="text" name="puk" value="{{ contract.puk if action == 'edit' else '' }}" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 border p-2">
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Monatliche Kosten (€)</label>
<input type="number" step="0.01" name="monthly_cost" value="{{ contract.monthly_cost if action == 'edit' else '' }}" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 border p-2">
</div>
<div class="flex items-center justify-between mt-6">
<button type="button" onclick="window.history.back()" class="text-gray-600 hover:underline">Abbrechen</button>
<button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded hover:bg-blue-700 transition">Speichern</button>
</div>
</form>
</div>
{% endblock %}