37 lines
1.8 KiB
HTML
37 lines
1.8 KiB
HTML
{% 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 %}
|