<?php
if (isset($con))
{
?>
	<!-- Modal -->
	<div class="modal fade" id="productoFinalModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel"><i class='glyphicon glyphicon-edit'></i> Editar producto final</h4>
				</div>
			  	<form class="form-horizontal" method="post" id="editar_producto_final" name="editar_producto_final">
					<div class="modal-body">
						<div id="resultados_ajax2"></div>
						<div class="form-group">
							<input type="hidden" id="mod_id_producto_final" name="mod_id_producto_final">
							<label for="tipo" class="col-sm-3 control-label">Tipo</label>
							<div class="col-sm-8">
						  		<select class="form-control" id="tipo2" name="tipo2" title="Tipo del producto final" required>
									<option value="">---Seleccione un tipo---</option>
									<?php 
									$query_rubros = mysqli_query($con, "SELECT * FROM rubros ORDER BY rubro");
									while($row_rubro = mysqli_fetch_array($query_rubros)){
										$rubro = $row_rubro['rubro'];
										echo "<option value=\"$rubro\">$rubro</option>";
									}
									?>
								</select>
							</div>
			  			</div>
						<div class="form-group">
							<label for="descripcion" class="col-sm-3 control-label">Descripción</label>
							<div class="col-sm-8">
						  		<input type="text" class="form-control" id="descripcion2" name="descripcion2" placeholder="" title="Descripción del producto final" required>
							</div>
			  			</div>
		 	 		</div>
		  			<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
						<button type="submit" class="btn btn-primary" id="actualizar_datos">Actualizar datos</button>
		  			</div>
		  		</form>
			</div>
	  	</div>
	</div>
<?php
}
?>