2025-02-19 14:27:14 -03:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
2025-02-20 10:39:31 -03:00
|
|
|
{% block title %}Novo Militante{% endblock %}
|
2025-02-19 14:27:14 -03:00
|
|
|
|
|
|
|
|
{% block content %}
|
2025-02-20 10:39:31 -03:00
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-8 offset-md-2">
|
|
|
|
|
<h1 class="mb-4">Criar Novo Militante</h1>
|
|
|
|
|
|
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
|
|
|
{% if messages %}
|
|
|
|
|
{% for category, message in messages %}
|
|
|
|
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endwith %}
|
|
|
|
|
|
|
|
|
|
<form method="post" class="mb-4">
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="nome" class="form-label">Nome:</label>
|
|
|
|
|
<input type="text" class="form-control" id="nome" name="nome" required
|
|
|
|
|
value="{{ dados_anteriores.nome if dados_anteriores else '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="cpf" class="form-label">CPF:</label>
|
|
|
|
|
<input type="text" class="form-control" id="cpf" name="cpf" required
|
|
|
|
|
value="{{ dados_anteriores.cpf if dados_anteriores else '' }}"
|
|
|
|
|
pattern="\d{3}\.?\d{3}\.?\d{3}-?\d{2}"
|
|
|
|
|
title="Digite um CPF no formato: xxx.xxx.xxx-xx">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="email" class="form-label">Email:</label>
|
|
|
|
|
<input type="email" class="form-control" id="email" name="email" required
|
|
|
|
|
value="{{ dados_anteriores.email if dados_anteriores else '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="telefone" class="form-label">Telefone:</label>
|
|
|
|
|
<input type="text" class="form-control" id="telefone" name="telefone"
|
|
|
|
|
value="{{ dados_anteriores.telefone if dados_anteriores else '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="endereco" class="form-label">Endereço:</label>
|
|
|
|
|
<input type="text" class="form-control" id="endereco" name="endereco"
|
|
|
|
|
value="{{ dados_anteriores.endereco if dados_anteriores else '' }}">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3 form-check">
|
|
|
|
|
<input type="checkbox" class="form-check-input" id="filiado" name="filiado"
|
|
|
|
|
{% if dados_anteriores and dados_anteriores.filiado %}checked{% endif %}>
|
|
|
|
|
<label class="form-check-label" for="filiado">Filiado</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="d-flex gap-2">
|
|
|
|
|
<button type="submit" class="btn btn-primary">Criar</button>
|
|
|
|
|
<a href="{{ url_for('listar_militantes') }}" class="btn btn-secondary">Voltar</a>
|
|
|
|
|
<a href="{{ url_for('home') }}" class="btn btn-outline-primary">Início</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-02-19 14:27:14 -03:00
|
|
|
{% endblock %}
|
|
|
|
|
|