{% extends "layout.html" %}
{% block title %}Mantenimiento de empresa
{% endblock %}

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

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

	<div class="row" style="padding: 30px 30px;background-color: white;margin: 0 20px;">
		<div class="col-md-6">
			<form action="accion_empresa.php" method="POST">
				<div class="row" style="margin-top: 10px;">
					<div class="col-md-5">
						<p>Nombre de la empresa</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="text" name="nombre_empresa" value="{{empresa.nombre}}">
					</div>
				</div>
				<div class="row" style="margin-top: 10px;">
					<div class="col-md-5">
						<p>RUC</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="text" name="ruc" value="{{empresa.ruc}}">
					</div>
				</div>
				<div class="row" style="margin-top: 10px;">
					<div class="col-md-5">
						<p>Razon social</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="text" name="razon_social" value="{{empresa.razon_social}}">
					</div>
				</div>
				<div class="row" style="margin-top: 10px;">
					<div class="col-md-5">
						<p>Direcci&oacute;n</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="text" name="direccion" value="{{empresa.direccion}}">
					</div>
				</div>
				<div class="row" style="margin-top: 10px;">
					<div class="col-md-5">
						<p>Correo</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="email" name="correo" value="{{empresa.correo}}">
					</div>
				</div>
				<div class="row" style="margin-top: 10px;">
					<div class="col-md-5">
						<p>Web</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="text" name="web" value="{{empresa.web}}">
					</div>
				</div>
				<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
					<div class="col-md-5">
						<p>Representante legal</p>
					</div>
					<div class="col-md-7">
						<input class="form-control" type="text" name="representante_legal" value="{{empresa.representante_legal}}">
					</div>
				</div>
				<input type="hidden" name="actualizar_empresa" value="true">
				<button class="btn btn-verdedark" type="submit" style="margin-bottom: 20px;">Actualizar</button>
			</form>
		</div>
		<div class="col-md-6">
			<div>

				<p class="bg-verdelight text-center">Logo</p>
				<div style="display: flex;justify-content: center;">
					<img src="public/galeria/{{empresa.logo}}" style="width: 200px;" alt="">
				</div>
				<hr>
				<form action="accion_empresa.php" method="post" enctype="multipart/form-data">
					<input name="logo_empresa" type="file">
					<input name="cambiar_logo" value="true" type="hidden">
					<button class="btn btn-verdedark" type="submit" style="margin-top: 10px;">Cambiar logo</button>
				</form>
			</div>
		</div>
	</div>

{% endblock %}
