42 lines
1.7 KiB
HTML
42 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Editar Feed RSS{% endblock %}
|
|
{% block content %}
|
|
<h1>Editar Feed</h1>
|
|
<div class="card">
|
|
<form method="post" autocomplete="off">
|
|
<label for="nombre">Nombre del feed</label>
|
|
<input id="nombre" name="nombre" type="text" placeholder="Nombre" value="{{ feed['nombre'] }}" required>
|
|
|
|
<label for="descripcion">Descripción</label>
|
|
<textarea id="descripcion" name="descripcion" rows="2" placeholder="Breve descripción del feed">{{ feed['descripcion'] or '' }}</textarea>
|
|
|
|
<label for="url">URL del RSS</label>
|
|
<input id="url" name="url" type="url" placeholder="URL" value="{{ feed['url'] }}" required>
|
|
|
|
<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>
|
|
|
|
<label for="pais_id">País</label>
|
|
<select id="pais_id" name="pais_id" required>
|
|
<option value="">— Elige país —</option>
|
|
{% for p in paises %}
|
|
<option value="{{ p.id }}" {% if p.id == feed['pais_id'] %}selected{% endif %}>{{ p.nombre }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<div style="margin: 12px 0;">
|
|
<input type="checkbox" id="activo" name="activo" {% if feed['activo'] %}checked{% endif %}>
|
|
<label for="activo" style="display:inline;">Activo</label>
|
|
</div>
|
|
|
|
<button class="btn" type="submit">Guardar cambios</button>
|
|
<a href="{{ url_for('feeds') }}">Cancelar</a>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|
|
|