{% extends "layout.html" %}
{% block title %}Mantenimiento tipo persona{% endblock %}

{% set nav_active = 'tablas' %}
{% block content %}

{% if message_error %}
<div class="alert alert-danger alert-dismissible" role="alert">
	{{message_error}}
	<button type="button" class="close" data-dismiss="alert" aria-label="Close">
		<span aria-hidden="true">&times;</span>
	</button>
</div>
{% endif %}
{% if message_success %}
<div class="alert alert-success alert-dismissible" role="alert">
	{{message_success}}
	<button type="button" class="close" data-dismiss="alert" aria-label="Close">
		<span aria-hidden="true">&times;</span>
	</button>
</div>
{% endif %}

<div class="box">
	<div class="box-header with-border">
		<h3 class="box-title">Tipo persona</h3>
		<div class="box-tools pull-right">
			<button class="btn btn-box-tool" data-widget="collapse">
				<i class="fa fa-minus"></i>
			</button>

			<button class="btn btn-box-tool" data-widget="remove">
				<i class="fa fa-times"></i>
			</button>
		</div>
	</div>
	<div class="box-body">
		<div class="row">
			<div class="col-md-12">

				<form action="accion_tipopersona.php" method="get">
					<div class="form-row">
						<div class="form-group col">
							<label for="">Tipo persona 1</label>
							{% for tipo_persona in tipo_personas %}
							{% if tipo_persona.id == 1 %}
							<input class="form-control" name="tipo_persona" type="text" value="{{tipo_persona.nombre}}">
							<input name="tipo" type="hidden" value="{{tipo_persona.id}}">
							{% endif %}
							{% endfor %}
						</div>
						<div class="form-group col">
							<button class="btn btn-verdedark mt-4" type="submit">Actualizar</button>
						</div>
					</div>
				</form>
				<form action="accion_tipopersona.php" method="get">
					<div class="form-row">
						<div class="form-group col">
							<label for="">Tipo persona 2</label>
							{% for tipo_persona in tipo_personas %}
							{% if tipo_persona.id == 2 %}
							<input class="form-control" name="tipo_persona" type="text" value="{{tipo_persona.nombre}}">
							<input name="tipo" type="hidden" value="{{tipo_persona.id}}">
							{% endif %}
							{% endfor %}
						</div>
						<div class="form-group col">
							<button class="btn btn-verdedark mt-4" type="submit">Actualizar</button>
						</div>
					</div>
				</form>

			</div>
		</div>
	</div>
</div>




{% endblock %}