| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478 |
- {% extends "admin/base.html" %}
- {% block content %}
- {% include 'components/confirm_modal.html' %}
- {% include 'components/loading_spinner.html' %}
- <div x-data="{ activeTab: 'pihole' }" class="bg-white rounded-lg shadow-lg p-4 sm:p-6">
- <h2 class="text-xl sm:text-2xl font-bold text-gray-800 mb-4 sm:mb-6">{{ _("Blacklist - Gestor de Listas") }}</h2>
- <!-- Tabs -->
- <div class="flex border-b border-gray-200 flex-wrap">
- <button @click="activeTab = 'pihole'" :class="activeTab === 'pihole' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm whitespace-nowrap">
- {{ _("Pi-hole") }}
- </button>
- <button @click="activeTab = 'adguard'" :class="activeTab === 'adguard' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm whitespace-nowrap">
- {{ _("AdGuard") }}
- </button>
- <button @click="activeTab = 'dnsmasq'" :class="activeTab === 'dnsmasq' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm whitespace-nowrap">
- {{ _("DNSmasq") }}
- </button>
- <button @click="activeTab = 'custom'" :class="activeTab === 'custom' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm whitespace-nowrap">
- {{ _("Personalizada") }}
- </button>
- <button @click="activeTab = 'blocked_users'" :class="activeTab === 'blocked_users' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm whitespace-nowrap">
- {{ _("IPs bloqueadas") }}
- </button>
- <button @click="activeTab = 'import'" :class="activeTab === 'import' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm whitespace-nowrap">
- {{ _("Importar") }}
- </button>
- </div>
- <!-- Pi-hole Tab -->
- <div x-show="activeTab === 'pihole'" class="mt-6">
- <h3 class="text-lg font-semibold mb-3 flex items-center gap-2">
- {{ _("Integración Pi-hole") }}
- <span class="inline-block bg-yellow-200 text-yellow-800 text-xs font-bold px-2 py-0.5 rounded align-middle border border-yellow-300 shadow-sm animate-pulse" title="{{ _("Funcionalidad en Beta") }}">{{ _("BETA") }}</span>
- </h3>
- <p class="text-sm text-gray-600 mb-4">{{ _("Conecta y sincroniza listas bloqueadas desde un servidor Pi-hole. Aquí puedes configurar conexión y ver el estado.") }}</p>
- <form method="POST" action="/admin/blacklist/test-connection" class="grid grid-cols-1 md:grid-cols-2 gap-4">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <div class="bg-gray-50 p-4 rounded border">
- <label class="text-sm font-medium text-gray-700">{{ _("Pi-hole Host") }}</label>
- <input name="host" type="text" class="w-full mt-2 p-2 border rounded" placeholder="{{ _("192.168.1.2 or example.com") }}" />
- </div>
- <div class="bg-gray-50 p-4 rounded border">
- <label class="text-sm font-medium text-gray-700">{{ _("API Token") }}</label>
- <input name="token" type="password" class="w-full mt-2 p-2 border rounded" placeholder="{{ _("Token (opcional)") }}" />
- </div>
- <div class="md:col-span-2 mt-4 flex gap-2">
- <button type="submit" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded">{{ _("Probar Conexión") }}</button>
- </form>
- <form method="POST" action="/admin/blacklist/sync" class="mt-0">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <button type="submit" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded">{{ _("Sincronizar Listas") }}</button>
- </form>
- </div>
- </div>
- <!-- Blocked IPs Tab -->
- <div x-show="activeTab === 'blocked_users'" class="mt-6">
- <h3 class="text-lg font-semibold mb-3">{{ _("IPs bloqueadas") }}</h3>
- <p class="text-sm text-gray-600 mb-4">{{ _("Lista de IPs que actualmente están bloqueadas en la base de datos.") }}</p>
- {% if blocked_users %}
- <div class="overflow-x-auto bg-white rounded shadow border" id="blocked-users-table-container">
- <table id="blocked-users-table" class="min-w-full text-left text-sm text-gray-700">
- <thead class="bg-gray-50 text-xs uppercase text-gray-500">
- <tr>
- <th class="px-4 py-3">{{ _("Usuario") }}</th>
- <th class="px-4 py-3">{{ _("IP") }}</th>
- <th class="px-4 py-3">{{ _("Notas") }}</th>
- <th class="px-4 py-3">{{ _("Estado") }}</th>
- <th class="px-4 py-3">{{ _("Creado") }}</th>
- <th class="px-4 py-3">{{ _("Acciones") }}</th>
- </tr>
- </thead>
- <tbody>
- {% for user in blocked_users %}
- <tr class="border-t last:border-b">
- <td class="px-4 py-3">{{ user.username }}</td>
- <td class="px-4 py-3 font-mono text-sm text-gray-800">{{ user.ip }}</td>
- <td class="px-4 py-3">{{ user.notes or '-' }}</td>
- <td class="px-4 py-3">
- {% if user.active %}
- <span class="inline-flex items-center rounded-full bg-emerald-100 px-2 py-1 text-xs font-semibold text-emerald-700">{{ _("Activo") }}</span>
- {% else %}
- <span class="inline-flex items-center rounded-full bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-600">{{ _("Inactivo") }}</span>
- {% endif %}
- </td>
- <td class="px-4 py-3">{{ user.created_at.strftime('%Y-%m-%d %H:%M') }}</td>
- <td class="px-4 py-3">
- <form method="POST" action="/admin/blacklist/delete-blocked-user" class="delete-blocked-user-form inline">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <input type="hidden" name="blocked_user_id" value="{{ user.id }}" />
- <input type="hidden" name="username" value="{{ user.username }}" />
- <button type="submit" class="bg-red-500 hover:bg-red-600 text-white px-3 py-1.5 rounded text-sm">{{ _("Eliminar") }}</button>
- </form>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- {% else %}
- <div class="bg-gray-50 p-4 rounded border text-sm text-gray-600">
- {{ _("No hay IPs bloqueadas en la base de datos.") }}
- </div>
- {% endif %}
- </div>
- <!-- AdGuard Tab -->
- <div x-show="activeTab === 'adguard'" class="mt-6">
- <h3 class="text-lg font-semibold mb-3">{{ _("Integración AdGuard") }}</h3>
- <p class="text-sm text-gray-600 mb-4">{{ _("Soporte para fuentes y listas públicas compatibles con AdGuard.") }}</p>
- <form id="importUrlForm" method="POST" action="/admin/blacklist/import" class="bg-gray-50 p-4 rounded border">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <label class="text-sm font-medium text-gray-700">{{ _("URL de la lista") }}</label>
- <input name="url" type="text" class="w-full mt-2 p-2 border rounded" placeholder="https://example.com/list.txt" />
- <div class="mt-3">
- <button type="submit" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded">{{ _("Agregar Lista") }}</button>
- </div>
- </form>
- {% if url_lists %}
- <div class="mt-6">
- <h4 class="text-md font-semibold mb-2 text-gray-700">{{ _("Listas importadas") }}</h4>
- <ul class="divide-y divide-gray-200 bg-white rounded shadow">
- {% for item in url_lists %}
- <li class="flex items-center justify-between px-4 py-3 hover:bg-gray-50 gap-3" x-data="{ enforced: {{ 'true' if item.enforced else 'false' }}, loading: false }">
- <div class="flex flex-col min-w-0 flex-1">
- <span class="font-mono text-blue-700 text-sm truncate max-w-xs md:max-w-md" title="{{ item.source_url }}">{{ item.source_url }}</span>
- <div class="flex items-center gap-2 mt-0.5">
- <span class="text-xs text-gray-500">{{ item.count }} dominios</span>
- <span x-show="enforced" class="inline-flex items-center gap-1 text-xs font-medium text-emerald-700 bg-emerald-50 border border-emerald-200 px-1.5 py-0.5 rounded-full">
- <i class="fas fa-shield-alt text-[10px]"></i> {{ _("Activa en Squid") }}
- </span>
- <span x-show="!enforced" class="inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 border border-gray-200 px-1.5 py-0.5 rounded-full">
- <i class="fas fa-ban text-[10px]"></i> {{ _("Inactiva") }}
- </span>
- </div>
- </div>
- <div class="flex items-center gap-2 flex-shrink-0">
- <!-- Toggle enforcement -->
- <button
- @click="toggleBlocklist('{{ item.source_url }}', !enforced, $el, (ok) => { if(ok) enforced = !enforced })"
- :disabled="loading"
- :class="enforced
- ? 'bg-emerald-500 hover:bg-emerald-600 focus:ring-emerald-300'
- : 'bg-gray-400 hover:bg-gray-500 focus:ring-gray-300'"
- class="relative inline-flex h-7 w-12 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-wait"
- role="switch"
- :aria-checked="enforced.toString()"
- :title="enforced ? 'Desactivar bloqueo en Squid' : 'Activar bloqueo en Squid'"
- >
- <span
- :class="enforced ? 'translate-x-5' : 'translate-x-0'"
- class="pointer-events-none inline-block h-6 w-6 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out flex items-center justify-center"
- >
- <i x-show="loading" class="fas fa-spinner fa-spin text-gray-400 text-xs"></i>
- </span>
- </button>
- <!-- Delete list -->
- <form method="POST" action="/admin/blacklist/delete-list" class="delete-list-form">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <input type="hidden" name="source_url" value="{{ item.source_url }}"/>
- <button type="submit" class="bg-red-500 hover:bg-red-600 text-white px-3 py-1.5 rounded text-xs font-semibold shadow delete-list-btn" title="{{ _("Eliminar lista y dominios") }}">
- <i class="fas fa-trash-alt"></i>
- </button>
- </form>
- </div>
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endif %}
- </div>
- <script>
- /**
- * Toggle Squid enforcement for a blocklist via the API.
- *
- * @param {string|null} sourceUrl The source_url (null for custom list)
- * @param {boolean} enable true = activate, false = deactivate
- * @param {HTMLElement} el The toggle button element (for loading state)
- * @param {function} callback Called with (true) on success, (false) on error
- */
- function toggleBlocklist(sourceUrl, enable, el, callback) {
- const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
- // Disable button while processing
- el.disabled = true;
- fetch('/admin/api/blocklist/toggle', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- 'X-CSRFToken': csrfToken
- },
- body: JSON.stringify({
- source_url: sourceUrl,
- enable: enable
- })
- })
- .then(function(resp) { return resp.json().then(function(data) { return { ok: resp.ok, data: data }; }); })
- .then(function(result) {
- el.disabled = false;
- if (result.ok && result.data.status === 'success') {
- showToast(result.data.message, 'success');
- callback(true);
- } else {
- showToast(result.data.message || 'Error al cambiar estado', 'error');
- callback(false);
- }
- })
- .catch(function(err) {
- el.disabled = false;
- showToast('Error de conexión al servidor', 'error');
- callback(false);
- });
- }
- /**
- * Lightweight toast notification.
- */
- function showToast(message, type) {
- var container = document.getElementById('toastContainer');
- if (!container) {
- container = document.createElement('div');
- container.id = 'toastContainer';
- container.className = 'fixed top-4 right-4 z-[60] flex flex-col gap-2 max-w-sm';
- document.body.appendChild(container);
- }
- var colorClasses = type === 'success'
- ? 'bg-emerald-600 text-white'
- : type === 'error'
- ? 'bg-red-600 text-white'
- : 'bg-gray-700 text-white';
- var icon = type === 'success' ? 'fa-check-circle' : type === 'error' ? 'fa-exclamation-circle' : 'fa-info-circle';
- var toast = document.createElement('div');
- toast.className = 'flex items-center gap-2 px-4 py-3 rounded-lg shadow-lg text-sm font-medium transform translate-x-full transition-transform duration-300 ' + colorClasses;
- toast.innerHTML = '<i class="fas ' + icon + '"></i><span>' + message + '</span>';
- container.appendChild(toast);
- // Animate in
- requestAnimationFrame(function() {
- toast.classList.remove('translate-x-full');
- toast.classList.add('translate-x-0');
- });
- // Auto-dismiss
- setTimeout(function() {
- toast.classList.remove('translate-x-0');
- toast.classList.add('translate-x-full');
- setTimeout(function() { toast.remove(); }, 300);
- }, 4000);
- }
- // Reutiliza el modal de confirmación global
- document.addEventListener('DOMContentLoaded', function() {
- function showImportLoading(title, subtitle) {
- const overlay = document.getElementById('importLoadingOverlay');
- const loadingTitle = document.getElementById('importLoadingTitle');
- const loadingSubtitle = document.getElementById('importLoadingSubtitle');
- if (loadingTitle && title) loadingTitle.textContent = title;
- if (loadingSubtitle && subtitle) loadingSubtitle.textContent = subtitle;
- if (overlay) {
- overlay.classList.remove('hidden');
- overlay.classList.add('flex');
- }
- }
- let pendingDeleteForm = null;
- document.querySelectorAll('.delete-list-form').forEach(function(form) {
- form.addEventListener('submit', function(e) {
- e.preventDefault();
- pendingDeleteForm = form;
- const url = form.querySelector('input[name="source_url"]').value;
- showCustomConfirm(
- `¿Estás seguro de que deseas eliminar la siguiente lista?\n\nURL: ${url}\n\nEsta acción es irreversible y eliminará todos los dominios asociados.`,
- function() {
- if (pendingDeleteForm) {
- pendingDeleteForm.submit();
- pendingDeleteForm = null;
- }
- }
- );
- });
- });
- const deleteBlockedUserConfirmTemplate = {{ _('¿Estás seguro de que deseas eliminar el usuario bloqueado %s de la base de datos? Esta acción también actualizará el archivo de IPs bloqueadas.')|tojson }};
- const deleteBlockedUserErrorText = {{ _('Error al eliminar usuario bloqueado')|tojson }};
- const deleteBlockedUserConnectionErrorText = {{ _('Error de conexión al servidor')|tojson }};
- document.querySelectorAll('.delete-blocked-user-form').forEach(function(form) {
- form.addEventListener('submit', function(e) {
- e.preventDefault();
- pendingDeleteForm = form;
- const username = form.querySelector('input[name="username"]').value;
- const confirmMessage = deleteBlockedUserConfirmTemplate.replace('%s', username);
- showCustomConfirm(
- confirmMessage,
- function() {
- if (!pendingDeleteForm) {
- return;
- }
- const blockedUserId = pendingDeleteForm.querySelector('input[name="blocked_user_id"]').value;
- const csrfToken = pendingDeleteForm.querySelector('input[name="csrf_token"]').value;
- fetch('/admin/blacklist/delete-blocked-user', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- 'X-CSRFToken': csrfToken,
- },
- body: JSON.stringify({ blocked_user_id: blockedUserId }),
- })
- .then(function(resp) { return resp.json().then(function(data) { return { ok: resp.ok, data: data }; }); })
- .then(function(result) {
- if (result.ok && result.data.status === 'success') {
- showToast(result.data.message, 'success');
- const row = pendingDeleteForm.closest('tr');
- if (row) {
- row.remove();
- }
- const tbody = document.querySelector('#blocked-users-table tbody');
- if (tbody && tbody.querySelectorAll('tr').length === 0) {
- const container = document.getElementById('blocked-users-table-container');
- if (container) {
- const emptyText = {{ _('No hay IPs bloqueadas en la base de datos.')|tojson }};
- container.innerHTML = `
- <div class="bg-gray-50 p-4 rounded border text-sm text-gray-600">
- ${emptyText}
- </div>
- `;
- }
- }
- } else {
- showToast(result.data.message || deleteBlockedUserErrorText, 'error');
- }
- })
- .catch(function() {
- showToast(deleteBlockedUserConnectionErrorText, 'error');
- })
- .finally(function() {
- pendingDeleteForm = null;
- });
- }
- );
- });
- });
- // Validación para evitar agregar listas duplicadas
- const addListForm = document.getElementById('importUrlForm');
- if (addListForm) {
- addListForm.addEventListener('submit', function(e) {
- const input = addListForm.querySelector('input[name="url"]');
- if (!input) return;
- const newUrl = input.value.trim();
- if (!newUrl) return;
- // Recolectar URLs ya existentes
- const existingUrls = Array.from(document.querySelectorAll('input[name="source_url"]'))
- .map(el => el.value.trim());
- if (existingUrls.includes(newUrl)) {
- showCustomConfirm(
- 'La lista ya existe en el sistema. No puedes agregar la misma URL dos veces.',
- function() {}, // Solo cerrar
- { onlyClose: true }
- );
- e.preventDefault();
- return;
- }
- showImportLoading(
- 'Importando lista desde URL',
- 'Validando enlace y procesando dominios...'
- );
- });
- }
- const importFileForm = document.getElementById('importFileForm');
- if (importFileForm) {
- importFileForm.addEventListener('submit', function() {
- showImportLoading(
- 'Importando archivo de listas',
- 'Leyendo archivo y aplicando reglas de bloqueo...'
- );
- });
- }
- window.addEventListener('pageshow', function() {
- const overlay = document.getElementById('importLoadingOverlay');
- if (overlay) {
- overlay.classList.add('hidden');
- overlay.classList.remove('flex');
- }
- });
- });
- </script>
- <!-- DNSmasq Tab -->
- <div x-show="activeTab === 'dnsmasq'" class="mt-6">
- <h3 class="text-lg font-semibold mb-3 flex items-center gap-2">
- {{ _("DNSmasq") }}
- <span class="inline-block bg-yellow-200 text-yellow-800 text-xs font-bold px-2 py-0.5 rounded align-middle border border-yellow-300 shadow-sm animate-pulse" title="{{ _("Funcionalidad en Beta") }}">{{ _("BETA") }}</span>
- </h3>
- <p class="text-sm text-gray-600 mb-4">{{ _("Exporta o importa reglas en formato compatible con dnsmasq.") }}</p>
- <div class="bg-gray-50 p-4 rounded border">
- <button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded">{{ _("Exportar archivo hosts") }}</button>
- </div>
- </div>
- <!-- Custom Tab -->
- <div x-show="activeTab === 'custom'" x-data="{ customEnforced: {{ 'true' if custom_enforced else 'false' }}, customLoading: false }" class="mt-6">
- <div class="flex items-center justify-between mb-3">
- <div>
- <h3 class="text-lg font-semibold">{{ _("Lista Personalizada") }}</h3>
- <p class="text-sm text-gray-600">{{ _("Añade dominios manualmente o pega una lista separada por comas/lineas.") }}</p>
- </div>
- <div class="flex items-center gap-3 flex-shrink-0">
- <div class="flex items-center gap-2">
- <span x-show="customEnforced" class="inline-flex items-center gap-1 text-xs font-medium text-emerald-700 bg-emerald-50 border border-emerald-200 px-2 py-1 rounded-full">
- <i class="fas fa-shield-alt text-[10px]"></i> {{ _("Activa en Squid") }}
- </span>
- <span x-show="!customEnforced" class="inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 border border-gray-200 px-2 py-1 rounded-full">
- <i class="fas fa-ban text-[10px]"></i> {{ _("Inactiva") }}
- </span>
- </div>
- <button
- @click="toggleBlocklist(null, !customEnforced, $el, (ok) => { if(ok) customEnforced = !customEnforced })"
- :disabled="customLoading"
- :class="customEnforced
- ? 'bg-emerald-500 hover:bg-emerald-600 focus:ring-emerald-300'
- : 'bg-gray-400 hover:bg-gray-500 focus:ring-gray-300'"
- class="relative inline-flex h-7 w-12 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-wait"
- role="switch"
- :aria-checked="customEnforced.toString()"
- :title="customEnforced ? 'Desactivar bloqueo en Squid' : 'Activar bloqueo en Squid'"
- >
- <span
- :class="customEnforced ? 'translate-x-5' : 'translate-x-0'"
- class="pointer-events-none inline-block h-6 w-6 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out flex items-center justify-center"
- >
- <i x-show="customLoading" class="fas fa-spinner fa-spin text-gray-400 text-xs"></i>
- </span>
- </button>
- </div>
- </div>
- <form method="POST" action="/admin/blacklist/save-custom" class="grid grid-cols-1 gap-4">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <textarea name="custom_list" rows="6" class="w-full p-3 border rounded" placeholder="{{ _("example.com
- example.org") }}">{{ blacklist }}</textarea>
- <div class="flex gap-2">
- <button type="submit" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded">{{ _("Guardar") }}</button>
- <button type="button" class="bg-gray-200 hover:bg-gray-300 px-4 py-2 rounded">{{ _("Cancelar") }}</button>
- </div>
- </form>
- </div>
- <!-- Import Tab -->
- <div x-show="activeTab === 'import'" class="mt-6">
- <h3 class="text-lg font-semibold mb-3">{{ _("Importar listas") }}</h3>
- <p class="text-sm text-gray-600 mb-4">{{ _("Importa desde archivos locales o pega URLs de listas públicas.") }}</p>
- <form id="importFileForm" method="POST" action="/admin/blacklist/import" enctype="multipart/form-data" class="bg-gray-50 p-4 rounded border">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
- <label class="text-sm font-medium text-gray-700">{{ _("Subir archivo") }}</label>
- <input name="file" type="file" class="w-full mt-2" />
- <div class="mt-3">
- <button type="submit" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded">{{ _("Importar") }}</button>
- </div>
- </form>
- </div>
- </div>
- {% endblock %}
|