Actualización del 2025-06-15 a las 19:26:12
This commit is contained in:
parent
d23754d3b8
commit
603149d47a
9 changed files with 350 additions and 122 deletions
37
templates/edit_url_source.html
Normal file
37
templates/edit_url_source.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Editar Fuente URL{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Editar Fuente: {{ fuente.nombre }}</h2>
|
||||
<form action="{{ url_for('edit_url_source', url_id=fuente.id) }}" method="post" class="form-section">
|
||||
<div class="mb-3">
|
||||
<label for="nombre">Nombre de la Fuente</label>
|
||||
<input type="text" id="nombre" name="nombre" value="{{ fuente.nombre }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="url">URL de la Fuente</label>
|
||||
<input type="url" id="url" name="url" value="{{ fuente.url }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="categoria_id">Categoría por Defecto</label>
|
||||
<select id="categoria_id" name="categoria_id">
|
||||
<option value="">-- Sin categoría --</option>
|
||||
{% for cat in categorias %}<option value="{{ cat.id }}" {% if cat.id == fuente.categoria_id %}selected{% endif %}>{{ cat.nombre }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="pais_id">País por Defecto</label>
|
||||
<select id="pais_id" name="pais_id">
|
||||
<option value="">-- Sin país --</option>
|
||||
{% for p in paises %}<option value="{{ p.id }}" {% if p.id == fuente.pais_id %}selected{% endif %}>{{ p.nombre }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="idioma">Idioma (código de 2 letras)</label>
|
||||
<input type="text" id="idioma" name="idioma" value="{{ fuente.idioma }}" required pattern="[a-z]{2}">
|
||||
</div>
|
||||
<div class="d-flex justify-content-end">
|
||||
<a href="{{ url_for('manage_urls') }}" class="btn btn-secondary" style="margin-right: 10px;">Cancelar</a>
|
||||
<button type="submit" class="btn">Actualizar Fuente</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue