66 lines
3 KiB
HTML
66 lines
3 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" action="{{ url_for('edit_feed', feed_id=feed.id) }}" 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('manage_feeds') }}" style="margin-left: 15px;">Cancelar</a>
|
|
</form>
|
|
</div>
|
|
|
|
<a href="{{ url_for('manage_feeds') }}" class="top-link">← Volver a la lista de feeds</a>
|
|
|
|
{% endblock %}
|