<?php use_helper( 'UrlFunctions' ); ?>
<?php use_helper( 'UtilFunctions' ); ?>
<?php use_helper( 'IncludePartial' ); ?>

<span class="txt1 p-b-11">Empresa</span>
<div class="form-label-group">
    <select class="form-control" name="IdCompania" id="IdCompania" required
        onchange="$('#IdSucursal')[0].options.length = 0; 
                  publicForSelectAjaxJSON('<?php echo buildUrl( 'user/request' ) ?>', 'tiporeq=LoadSucursal&IdCompania='+this.value, 'IdSucursal', null, false);"
    >
        <?php foreach ( $a_Compania as $i_Key => $o_ObjectBN ){ ?>
        <option value="<?=$o_ObjectBN->getIdCompania()?>"> <?=$o_ObjectBN->getDescripcionCorta()?> </option>
        <?php } ?>
    </select>
</div>

<span class="txt1 p-b-11">Sucursal</span>
<div class="form-label-group">
    <select class="form-control" id="IdSucursal" name="IdSucursal" required>
        <?php foreach ( $a_SEG_SucursalUsuario as $i_Key => $o_SEG_SucursalUsuarioBN ){ ?>
        <option value="<?=$o_SEG_SucursalUsuarioBN->getIdSucursal()?>"> <?=$o_SEG_SucursalUsuarioBN->getDescripcionSucu()?> </option>
        <?php } ?>
    </select>
</div>