mypastebin/templates/create_paste.html
2025-05-29 22:40:58 +02:00

52 lines
2.0 KiB
HTML

<!-- templates/create_paste.html -->
{% extends "base.html" %}
{% block title %}Crear Nuevo Paste{% endblock %}
{% block content %}
<div class="container mt-4">
<h2>Crear Nuevo Paste</h2>
<form method="POST" action="{{ url_for('create_paste') }}">
<!-- Mostrar mensajes flash -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
<div class="mb-3">
<label for="title" class="form-label">Título</label>
<input type="text" class="form-control" id="title" name="title" placeholder="Ingresa el título" required>
</div>
<div class="mb-3">
<label for="content" class="form-label">Contenido</label>
<textarea class="form-control" id="content" name="content" rows="10" placeholder="Ingresa el contenido del paste" required></textarea>
</div>
<div class="mb-3">
<label for="language" class="form-label">Lenguaje</label>
<input type="text" class="form-control" id="language" name="language" placeholder="Por ejemplo: Python, JavaScript">
</div>
<div class="mb-3">
<label for="type" class="form-label">Tipo de Paste</label>
<select class="form-select" id="type" name="type">
<option value="Text" selected>Texto</option>
<option value="File">Archivo</option>
<option value="Media">Media</option>
</select>
</div>
<button type="submit" class="btn btn-primary">Crear Paste</button>
</form>
</div>
{% endblock %}