<!-- Modal -->
<div id="modalAgregarClientePos" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
    <div class="modal-content">
        <?php $clienteForm = new ClienteForm();
              echo $clienteForm->openForm();
              echo $clienteForm->showActionController();
              echo $clienteForm->showId();?>
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="customerModalLabel"></h3>
            <div id="infoProducto"></div>
        </div> 
        <div id="flashmessenger-agregarCliente"></div>
        <div class="modal-body">   
            <div class='col-lg-12 col-md-12 col-sm-12'>                
                <div><?php echo $clienteForm->showElement('nombre');?></div>
                <div><?php echo $clienteForm->showElement('nombre_empresa');?></div>
                <div><?php echo $clienteForm->showElement('calle');?></div>
                <div><?php echo $clienteForm->showElement('ciudad');?></div>                
                <div><?php echo $clienteForm->showElement('telefono');?></div>
                <div><?php echo $clienteForm->showElement('correo');?></div>
            </div>
                <div class="clear"></div>        
        </div>
        <div class="modal-footer">
            <div class="col-lg-12 col-md-12 col-sm-12">
                <?php $element = $clienteForm->getElement('guardarCliente');echo $form->createOnlyElement($element);?>
            </div>
        </div>
        <?php echo $clienteForm->closeForm();?>
    </div>           
    </div>
    <script type="text/javascript">              
        $('#modalAgregarClientePos').on('shown.bs.modal',function(){
            $('#nombre').focus();
        });    
        
        $('form[name=cliente] #nombre').on('keyup',function(e){if(e.keyCode===13){$('form[name=cliente] #nombre_empresa').focus();}});
        $('form[name=cliente] #nombre_empresa').on('keyup',function(e){if(e.keyCode===13){$('form[name=cliente] #calle').focus();}});
        $('form[name=cliente] #calle').on('keyup',function(e){if(e.keyCode===13){$('form[name=cliente] #ciudad').focus();}});
        $('form[name=cliente] #ciudad').on('keyup',function(e){if(e.keyCode===13){$('form[name=cliente] #telefono').focus();}});
        $('form[name=cliente] #telefono').on('keyup',function(e){if(e.keyCode===13){$('form[name=cliente] #correo').focus();}});
        $('form[name=cliente] #correo').on('keyup',function(e){if(e.keyCode===13){$('form[name=cliente] #guardarCliente').focus();}});     
    </script>
</div>