rss2/templates/edit_feed.html
2026-01-13 13:39:51 +01:00

87 lines
No EOL
3.5 KiB
HTML

{% extends "base.html" %}
{% block title %}Editar Feed RSS{% endblock %}
{% block content %}
<div class="card feed-detail-card"
style="padding: 40px; border-radius: 15px; background-color: #fdfdfd; box-shadow: 0 10px 30px rgba(0,0,0,0.05);">
<h1
style="font-family: var(--primary-font); font-weight: 700; margin-bottom: 30px; border-bottom: 2px solid var(--accent-color); display: inline-block; padding-bottom: 10px;">
Editar Feed
</h1>
<p class="subtitle" style="margin-bottom: 30px; font-style: italic; color: #666;">
Modificando fuente: <strong>{{ feed.nombre }}</strong>
</p>
<form method="post" action="{{ url_for('feeds.edit_feed', feed_id=feed.id) }}" autocomplete="off" class="form-grid">
<div class="form-row">
<label for="nombre">Nombre del feed</label>
<input id="nombre" name="nombre" type="text" value="{{ feed.nombre }}" required>
</div>
<div class="form-row">
<label for="descripcion">Descripción</label>
<textarea id="descripcion" name="descripcion" rows="3">{{ feed.descripcion or '' }}</textarea>
</div>
<div class="form-row">
<label for="url">URL del RSS</label>
<input id="url" name="url" type="url" value="{{ feed.url }}" required>
</div>
<div class="form-row">
<label for="categoria_id">Categoría</label>
<select id="categoria_id" name="categoria_id">
<option value="">— Sin categoría —</option>
{% for c in categorias %}
<option value="{{ c.id }}" {% if c.id==feed.categoria_id %}selected{% endif %}>
{{ c.nombre }}
</option>
{% endfor %}
</select>
</div>
<div class="form-row">
<label for="pais_id">País</label>
<select id="pais_id" name="pais_id">
<option value="">— Global —</option>
{% for p in paises %}
<option value="{{ p.id }}" {% if p.id==feed.pais_id %}selected{% endif %}>
{{ p.nombre }}
</option>
{% endfor %}
</select>
</div>
<div class="form-row">
<label for="idioma">Idioma (2 letras)</label>
<input id="idioma" name="idioma" type="text" value="{{ feed.idioma or '' }}" maxlength="2">
</div>
<div class="form-row">
<div></div> <!-- Alignment -->
<div style="display: flex; align-items: center; gap: 15px;">
<input type="checkbox" id="activo" name="activo" {% if feed.activo %}checked{% endif %}
style="width: 24px; height: 24px; margin: 0;">
<label for="activo" style="margin: 0; text-align: left; font-size: 1.1rem;">Feed activo</label>
</div>
</div>
<div class="form-row" style="border: none; padding-top: 20px;">
<div></div> <!-- Alignment -->
<div class="form-actions">
<button class="btn btn-primary" type="submit">
<i class="fas fa-save"></i> Guardar Cambios
</button>
<a href="{{ url_for('feeds.list_feeds') }}" class="btn btn-secondary">
<i class="fas fa-times"></i> Cancelar
</a>
</div>
</div>
</form>
</div>
<div style="margin-top: 20px;">
<a href="{{ url_for('feeds.list_feeds') }}" class="top-link">← Volver al listado</a>
</div>
{% endblock %}