rss/templates/edit_feed.html
jlimolina 758da0ad4c feat: Versión final estable con nuevo diseño
Aplicación completamente funcional con servidor Waitress. Solucionados todos los problemas de arranque y recolección de noticias. Se ha implementado un nuevo diseño visual y el script de instalación está finalizado.
2025-06-08 23:07:37 +00:00

64 lines
2.9 KiB
HTML

{% extends "base.html" %}
{% block title %}Editar Feed RSS{% endblock %}
{% block content %}
<header>
<h1>Editar Feed</h1>
<p class="subtitle">Modifica los detalles de tu fuente de noticias: <strong>{{ feed.nombre }}</strong></p>
</header>
<div class="form-section">
<form method="post" autocomplete="off">
<div>
<label for="nombre">Nombre del feed</label>
<input id="nombre" name="nombre" type="text" value="{{ feed.nombre }}" required>
</div>
<div style="margin-top:15px;">
<label for="descripcion">Descripción</label>
<textarea id="descripcion" name="descripcion" rows="2">{{ feed.descripcion or '' }}</textarea>
</div>
<div style="margin-top:15px;">
<label for="url">URL del RSS</label>
<input id="url" name="url" type="url" value="{{ feed.url }}" required>
</div>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px;">
<div>
<label for="categoria_id">Categoría</label>
<select id="categoria_id" name="categoria_id" required>
<option value="">— Elige categoría —</option>
{% for cat in categorias %}
<option value="{{ cat.id }}" {% if cat.id == feed.categoria_id %}selected{% endif %}>{{ cat.nombre }}</option>
{% endfor %}
</select>
</div>
<div>
<label for="pais_id">País</label>
<select id="pais_id" name="pais_id">
<option value="">— Global / No aplica —</option>
{% for p in paises %}
<option value="{{ p.id }}" {% if p.id == feed.pais_id %}selected{% endif %}>{{ p.nombre }}</option>
{% endfor %}
</select>
</div>
</div>
<div style="margin-top:15px;">
<label for="idioma">Idioma (código de 2 letras)</label>
<input id="idioma" name="idioma" type="text" value="{{ feed.idioma or '' }}" maxlength="2" placeholder="ej: es, en, fr">
</div>
<div style="margin: 20px 0;">
<input type="checkbox" id="activo" name="activo" {% if feed.activo %}checked{% endif %} style="width: auto; vertical-align: middle; margin-right: 5px;">
<label for="activo" style="display:inline; font-weight:normal;">Feed activo</label>
</div>
<button class="btn" type="submit">Guardar Cambios</button>
<a href="{{ url_for('feeds') }}" style="margin-left: 15px;">Cancelar</a>
</form>
</div>
<a href="{{ url_for('feeds') }}" class="top-link">← Volver a la gestión de feeds</a>
{% endblock %}