2026-06-03 10:43:17 +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 New User') }}</h1>
|
|
|
|
|
<p class="text-gray-600 mt-1">{{ _('Register a new staff user in the system') }}</p>
|
|
|
|
|
</div>
|
2026-06-03 10:43:17 +01:00
|
|
|
|
2026-06-24 15:53:55 +01:00
|
|
|
{# User 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">{{ _('User Information') }}</h2>
|
2026-06-03 10:43:17 +01:00
|
|
|
</div>
|
2026-06-24 15:53:55 +01:00
|
|
|
<div class="p-6">
|
|
|
|
|
<form method="POST" action="/add_user" class="space-y-6">
|
|
|
|
|
<div>
|
|
|
|
|
<label for="name" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Name') }} *</label>
|
|
|
|
|
<input type="text" id="name" name="name" 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="{{ _('Full name') }}">
|
|
|
|
|
</div>
|
2026-06-03 10:43:17 +01:00
|
|
|
|
2026-06-24 15:53:55 +01:00
|
|
|
<div>
|
|
|
|
|
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Email') }}</label>
|
|
|
|
|
<input type="email" id="email" name="email"
|
|
|
|
|
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="{{ _('user@example.com') }}">
|
|
|
|
|
<p class="mt-1 text-sm text-gray-500">{{ _('Optional email address') }}</p>
|
|
|
|
|
</div>
|
2026-06-03 10:43:17 +01:00
|
|
|
|
2026-06-24 15:53:55 +01:00
|
|
|
<div>
|
|
|
|
|
<label for="phone" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Phone') }}</label>
|
|
|
|
|
<input type="text" id="phone" name="phone"
|
|
|
|
|
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="{{ _('Phone number') }}">
|
|
|
|
|
<p class="mt-1 text-sm text-gray-500">{{ _('Optional phone number') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label for="identification" class="block text-sm font-medium text-gray-700 mb-1">{{ _('Identification') }} *</label>
|
|
|
|
|
<input type="text" id="identification" name="identification" 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="{{ _('Employee ID, badge number, etc.') }}">
|
|
|
|
|
<p class="mt-1 text-sm text-gray-500">{{ _('Unique identification for the staff member') }}</p>
|
|
|
|
|
</div>
|
2026-06-03 10:43:17 +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="/"
|
|
|
|
|
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="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
|
|
|
|
|
</svg>
|
|
|
|
|
{{ _('Add User') }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2026-06-03 10:43:17 +01:00
|
|
|
</div>
|
2026-06-24 15:53:55 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-06-20 13:14:41 +01:00
|
|
|
{% endblock %}
|