<div class="container-fluid">
    <div class="">
        <div class="row">
            <div class="col-sm-12">
                <div class="fpbx-container">
                    <div class="display no-border">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <div class="col-md-11 h1">
                                        <div class="col-md-3"><a target="_blank" data-placement="right" data-content="<?php echo _('Learn more about module installation') ?>" href="https://informunity.<?php echo _('us')?>/marketplace/asterisk/" class="fa fa-question"></a></div>
                                        <div class="col-md-offset-2 col-md-5">InformUnity Bitrix24<i class="h6">Ver:<?php echo $version?></i></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row col-md-12">
                            <div class="col-md-4">
                                <div id="RegistrationDataPanel" class="panel panel-success iub24_panel"  data-target="#registrationData" data-toggle="modal">
                                    <div class="panel-heading">
                                        <h3 class="panel-title"><?php echo _("Registration Data") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixedtop">
                                        <!--#MAIN_1-->
                                        <?php echo $RegistrationData ?>

                                        <div id="license_group">
                                        <!--status app b24 -->
                                        <div class="element-container mt-6">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-5">
                                                                <label class="control-label"
                                                                       for="status_pay_b24"><?php echo _("The app's payment status") ?></label>
                                                            </div>
                                                            <div class="col-md-7">
                                                                <a href="javascript:void(0);" id="status_pay_b24">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                        <!--END status app b24-->

                                        <!--active before-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-5">
                                                                <label class="control-label"
                                                                       for="active_before"><?php echo _("License active till") ?></label>
                                                            </div>
                                                            <div class="col-md-7">
                                                                <a href="javascript:void(0);" id="active_before">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                        <!--END active before-->

                                        <!--extensions count from b24 -->
                                        <div class="element-container" id="div_extensions_count">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-5">
                                                                <label class="control-label"
                                                                       for="extensions_count"><?php echo _("Users with extensions") ?></label>

                                                            </div>
                                                            <div class="col-md-7">
                                                                <a href="javascript:void(0);" id="extensions_count">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                        </div>
                                        <!--END extensions count from b24-->
                                        <!--#END_MAIN_1-->
                                    </div>
                                    <div class="panel-footer hidden">
                                        <div id="error_license_404" class="row notification">
                                            <div class="col-md-12">
                                                <label class="element-container" style="color:red;"><?php echo _("Error: cannot get data from license.informunity.ru.");?><br><a style="color:red;"><?php echo _("more")?>...</a></label>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="panel panel-info iub24_panel saveOnLeave" id="HandlersPanel">
                                    <div class="panel-heading">
                                        <h3 class="panel-title"><?php echo _("Handlers") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixedtop">
                                        <!--ClickToCall-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-6">
                                                                <label class="control-label"
                                                                       for="click_call_reg"><?php echo _("Click to Call")?></label>
                                                            </div>
                                                            <div class="col-md-6" data-placement="isRegisterCall">
                                                                <div id="floatBarsG">
                                                                    <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--End_ClickToCall-->
                                        <!--Auto Answer -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-6">
                                                                <label class="control-label"
                                                                       for="ctc_autoanswer"><?php echo _("Auto Answer")?> <?php echo _("Click to Call")?></label>
                                                            </div>
                                                            <div class="col-md-6 radioset">
                                                                <input id="ctc_autoanswer_yes" name="ctc_autoanswer"
                                                                       value="1"
                                                                       type="radio" <?php echo ($config["ctc_autoanswer"] == 1) ? "checked" : ""?>
                                                                >
                                                                <label for="ctc_autoanswer_yes"><?php echo _("Yes")?></label>
                                                                <input id="ctc_autoanswer_no" name="ctc_autoanswer"
                                                                       value="0"
                                                                       type="radio" <?php echo ($config["ctc_autoanswer"] == 0 || empty($config["ctc_autoanswer"])) ? "checked" : ""?>
                                                                >
                                                                <label for="ctc_autoanswer_no"><?php echo _("No")?></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--End Auto Answer -->
                                        <!--Call Back-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-6">
                                                                <label class="control-label"
                                                                       for="click_back_reg"><?php echo _("Call Back")?></label>
                                                            </div>
                                                            <div class="col-md-6" data-placement="isRegisterCallback">
                                                                <div id="floatBarsG">
                                                                    <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Call Back-->
                                        <!--Call Back DEST-->
                                        <div class="element-container" data-target="#CallbacksModal">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-6">
                                                                <label class="control-label" for="Callback" ><?php echo _("Call Back Destinations")?>:</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <table id="CallbacksTable"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["CallbacksTable","getCallBacks"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-callbacks"
                                               data-maintain-selected="true"
                                               data-toggle="table"
                                               data-unique-id="line"
                                               data-pagination="true"
                                               data-side-pagination="client"
                                               data-page-size = "3"
                                               data-page-list = ""
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th class="col-md-3" data-field="line" data-align="center" data-valign="middle"><?php echo _("Line Number")?></th>
                                                <th data-field="destination"><?php echo _("Destination")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                    <div class="panel-footer hidden">
                                        <div id="ext_address_403" class="row notification hidden">
                                            <div class="col-md-12">
                                                <label class="element-container" style="color:red;"><?php echo _("The FreePBX server is not reachable from license.informunity.ru. Click To Call and Call Back can’t work like that.")?><br><a style="color:red;"><?php echo _("more")?>...</a></label>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="panel panel-info iub24_panel position-absolute saveOnLeave" id="AdvancedPanel">
                                    <div class="panel-heading">
                                        <h3 class="panel-title"><?php echo _("Advanced") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixedtop">
                                        <?php if($autorized):?>
                                        <!--Check softphone button -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-8">
                                                                <label class="control-label"
                                                                       for="check"><?php echo _("Softphone24 Settings")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="check"></i>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <input id="softphoneCheck" type="button" class="btn" value='<?php echo _("Check")?>'>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                        <span id="check-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--End check softphone button-->
                                        <?php endif;?>
                                        <!--Cache ID's-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-8">
                                                                <label class="control-label"
                                                                       for="clear_cache"><?php echo _("Cache")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="clear_cache"></i>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <input type="button" id="clear_cache" value='<?php echo _("Clear Cache")?>'>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="clear_cache-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Cache-->
                                        <!-- Download log -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"><?php echo _("Download log")?></label>
                                                            </div>
                                                            <?php if(extension_loaded ('Zip')):?>

                                                            <?php if(!empty($log_files)):?>
                                                            <div class="col-md-4">
                                                                <select class="form-control protocol" name="log-files">
                                                                    <?php foreach($log_files as $log_file):?>
                                                                    <option value='<?php echo $log_file["FILE_NAME"]?>'
                                                                            data-link='<?php echo $log_file["FILE_LINK"]?>'>
                                                                        <?php echo $log_file["FILE_NAME"]?>
                                                                    </option>
                                                                    <?php endforeach;?>
                                                                </select>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <input type="button" value='<?php echo _("Download")?>'
                                                                       data-bind="download_log">
                                                            </div>
                                                            <?php else:?>
                                                            <div class="col-md-9"><b
                                                                        style="color:orange">ERROR: <?php echo _("Events logging is not set up. Please, check Verbose parameter.")?> </b><a
                                                                        href="config.php?display=logfiles_settings#logfiles_logfiles"><?php echo _("more")?></a>
                                                            </div>
                                                            <?php endif;?>
                                                            <?php else:?>
                                                            <div class="col-md-9"><b
                                                                        style="color:red">ERROR: <?php echo _("Zip extension for PHP is not enabled")?> </b><a
                                                                        href="http://php.net/manual/ru/book.zip.php"><?php echo _("more")?></a>
                                                            </div>
                                                            <?php endif;?>


                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End Download log -->
                                        <!--Requests Timeout-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-8">
                                                                <label class="control-label"
                                                                       for="timeout"><?php echo _("Requests Timeout, sec.")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="timeout"></i>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <select name="timeout"
                                                                        class="form-control protocol">
                                                                    <?php for($i=3;$i <= 30; $i++):?>
                                                                    <option value="<?php echo $i?>"
                                                                    <?php echo $config['timeout'] == $i ? 'selected' : ''?>
                                                                    ><?php echo $i?></option>
                                                                    <?php endfor;?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="timeout-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Requests Timeout-->
                                        <?php if($autorized == "yes"):?>
                                        <!-- Records-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-8">
                                                                <label class="control-label"
                                                                       for="recording"><?php echo _("Recordings")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="recording"></i>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <select class="form-control" id="recordings"
                                                                        name="recordings">
                                                                    <option value="mp3"
                                                                    <?php echo (!empty($config['recordings']) && $config['recordings'] == "mp3")?"Selected":"" ?>
                                                                    >mp3</option>
                                                                    <option value="default"
                                                                    <?php echo (!empty($config['recordings']) && $config['recordings'] == "default")?"Selected":"" ?>
                                                                    ><?php echo _("FreePBX Format");?></option>
                                                                    <option value="not_send"
                                                                    <?php echo (!empty($config['recordings']) && $config['recordings'] == "not_send")?"Selected":"" ?>
                                                                    ><?php echo _("Don't Attach Records");?></option>
                                                                    <option value="stereo"
                                                                    <?php echo (!empty($config['recordings']) && $config['recordings'] == "stereo")?"Selected":"" ?>
                                                                    ><?php echo _("Stereo");?></option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="recording-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End Records -->
                                        <!-- Audio links -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-8">
                                                                <label class="control-label"
                                                                       for="links"><?php echo _("Links to records")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="links"></i>
                                                            </div>
                                                            <div class="col-md-4 radioset">
                                                                <input type="radio" id="links_yes" name="links" value="yes" <?php echo ($config['links'] == "yes")?"CHECKED":"" ?>>
                                                                <label for="links_yes"><?php echo _("Yes");?></label>
                                                                <input type="radio" id="links_no" name="links" value="no" <?php echo ($config['links'] == "no" || $MIXMON_FORMAT != 'wav' || $recordings == 'mp3' || $recordings == 'stereo')?"CHECKED":"" ?>>
                                                                <label for="links_no"><?php echo _("No");?></label>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="links-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End Audio links -->
                                        <!-- Region -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-8">
                                                                <label class="control-label"
                                                                       for="region"><?php echo _("Identify the region for Russia")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="region"></i>
                                                            </div>
                                                            <div class="col-md-4 radioset">
                                                                <input id="det_region_yes" name="det_region"
                                                                       value="1"
                                                                       type="radio" <?php echo ($detRegion == 1) ? "checked" : ""?>
                                                                >
                                                                <label for="det_region_yes"><?php echo _("Yes")?></label>
                                                                <input id="det_region_no" name="det_region"
                                                                       value="0"
                                                                       type="radio" <?php echo ($detRegion == 0 || empty($detRegion)) ? "checked" : ""?>
                                                                >
                                                                <label for="det_region_no"><?php echo _("No")?></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="region-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End Region -->
                                        <?php endif;?>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class=" row col-md-12">
                            <div class="col-sm-6">
                                <div class="panel panel-info iub24_panel" id="InboundDestinationsPanel">
                                    <div class="panel-heading" data-target="#InboundDestinations">
                                        <h3 class="panel-title"><?php echo _("Inbound Destinations") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixed">
                                        <div id="toolbar-all-panel">
                                            <a data-target="#add_inbound_modal" class="btn btn-primary inbound_dest_add"
                                               id="inbound_dest_add_window" data-toggle="modal">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>
                                        <table id="inbound_destinations_table"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["inbound_destinations_table","getDidsList"]'
                                               data-cache="false"
                                               data-maintain-selected="true"
                                               data-toolbar="#toolbar-all-panel"
                                               data-toggle="table"
                                               data-pagination="true"
                                               data-page-size = "5"
                                               data-page-list = ""
                                               data-search="true"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="id">#</th>
                                                <th data-field="description" data-align="center" data-valign="middle"><?php echo _("Description")?></th>
                                                <th data-field="defuser" data-align="center" data-valign="middle"><?php echo _("Default User")?></th>
                                                <th data-field="did" data-align="center" data-formatter="UsedCell" data-valign="middle"><?php echo _("Used as Destination")?></th>
                                                <th data-field="destination"><?php echo _("Destination")?></th>
                                                <th data-field="actions" class="col-md-2" data-align="center" data-valign="middle"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="panel panel-info iub24_panel" id="OutboundRoutesPanel">
                                    <div class="panel-heading" data-target="#OutboundRoutes">
                                        <h3 class="panel-title"><?php echo _("Outbound Routes") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixed">
                                        <div id="toolbar-all-outbound">
                                        </div>
                                        <table id="outbound_routes_table"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["outbound_routes_table","getOutboundRoutesList"]'
                                               data-cache="false"
                                               data-maintain-selected="true"
                                               data-toolbar="#toolbar-all-outbound"
                                               data-search="true"
                                               data-pagination="true"
                                               data-page-size = "5"
                                               data-page-list = ""
                                               data-toggle="table" class="table table-striped table-hover">
                                            <thead>
                                            <tr>
                                                <th data-field="name" data-align="center" data-valign="middle"><?php echo _("Description")?></th>
                                                <th data-field="status" data-align="center" data-valign="middle"><?php echo _("Status")?></th>
                                                <th data-field="actions" data-align="center" data-valign="middle" class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row col-md-12">
                            <div class="col-md-4">
                                <div class="panel panel-info iub24_panel" id="LinesPanel">
                                    <div class="panel-heading" data-target="#Lines">
                                        <h3 class="panel-title"><?php echo _("Lines") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixedbottom">
                                        <div id="toolbar-all-lines">
                                            <a class="btn btn-primary" id="lines_add_button" data-target="#addLine" data-toggle="modal">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>
                                        <table id="Lines_panel_table"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["Lines_panel_table","getLinesList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-lines"
                                               data-maintain-selected="true"
                                               data-toggle="table"
                                               data-pagination="true"
                                               data-page-size = "5"
                                               data-page-list = ""
                                               data-search="true"
                                               data-row-style="LinesrowStyle"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="lines-did" data-align="center" data-valign="middle"><?php echo _("DID")?></th>
                                                <th data-field="number" data-align="center" data-valign="middle"><?php echo _("Number")?></th>
                                                <th data-field="prefix" data-align="center" data-valign="middle" data-cell-style="LinescellStyle"><?php echo _("Prefix")?></th>
                                                <th data-field="used" data-align="center" data-valign="middle"><?php echo _("Used in")?></th>
                                                <th data-field="actions" data-align="center" data-valign="middle"
                                                    class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="panel panel-info iub24_panel" id="TasksPanel">
                                    <div class="panel-heading" data-target="#TasksModal">
                                        <h3 class="panel-title"><?php echo _("Tasks") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixedbottom">
                                        <div id="toolbar-all-task">
                                            <a class="btn btn-primary" data-target="#addTask" data-toggle="modal" id="task_add_button">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>

                                        <table id="tasks_table"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["tasks_table","getTasksList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-task"
                                               data-maintain-selected="true" data-toggle="table"
                                               data-pagination="true"
                                               data-page-size = "5"
                                               data-page-list = ""
                                               data-search="true"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="task_name" data-align="center"><?php echo _("Task name")?></th>
                                                <th data-field="observers" data-formatter="UsedCell"><?php echo _("Observers")?></th>
                                                <th data-field="deadline" data-align="center"><?php echo _("Deadline")?></th>
                                                <th data-field="used" data-formatter="UsedCell"><?php echo _("Used in")?></th>
                                                <th data-field="actions" data-align="center"
                                                    class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="panel panel-info iub24_panel" id="ExceptionsPanel">
                                    <div class="panel-heading" data-target="#ExceptionsModal">
                                        <h3 class="panel-title"><?php echo _("Exceptions") ?>:</h3>
                                    </div>
                                    <div class="panel-body fixedbottom">
                                        <div id="toolbar-all-exception">
                                            <a class="btn btn-primary" id="exception_add_button" data-target="#addException" data-toggle="modal">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>
                                        <table id="exceptions_grid"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["exceptions_grid","getExceptionsList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-exception"
                                               data-maintain-selected="true" data-toggle="table"
                                               data-pagination="true"
                                               data-page-size = "5"
                                               data-page-list = ""
                                               data-search="true"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="description" data-align="center" data-valign="middle"><?php echo _("Description")?></th>
                                                <th data-field="used" data-formatter="UsedCell" data-align="center" data-valign="middle"><?php echo _("Used in")?></th>
                                                <th data-field="actions" data-align="center" data-valign="middle"
                                                    class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <!--Modals -->

                        <!--Modal Menus -->

                        <!--Registration Data -->
                        <div id="registrationData" tabindex="-1" class="modal fade in" role="dialog">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Registration Data")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <!--#MAIN_1-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="client_server"><?php echo _("Bitrix24 address")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="client_server"></i>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <select name="portal_protocol"
                                                                        class="form-control protocol">
                                                                    <option value="https"
                                                                    <?php echo ($exist_client_server_scheme == "https" ? ' SELECTED' : '')?>
                                                                    >https</option>
                                                                    <option value="http"
                                                                    <?php echo ($exist_client_server_scheme == "http" ? ' SELECTED' : '')?>
                                                                    >http</option>

                                                                </select>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <input type="text" name="client_server"
                                                                       id="client_server"
                                                                       class="form-control fields_are_required"
                                                                       value="<?php echo parse_url($config['client_server'],PHP_URL_HOST)?>">
                                                            </div>
                                                            <div class="col-md-2">
                                                                <input type="text" name="client_server_port"
                                                                       id="client_server_port"
                                                                class="form-control fields_are_required port"
                                                                value="<?php echo $client_server_port ? $client_server_port : '443'?>">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="client_server-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="element-container" id="div_ext_address">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="ext_address"><?php echo _("FreePBX address")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="ext_address"></i>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <select name="fpbx_protocol"
                                                                        class="form-control protocol">
                                                                    <option value="http"
                                                                    <?php echo ($exist_ext_address_scheme == "http" ? ' SELECTED' : '')?>>http</option>
                                                                    <option value="https"
                                                                    <?php echo ($exist_ext_address_scheme == "https" ? ' SELECTED' : '')?>>https</option>
                                                                </select>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <input type="text" name="ext_address" id="ext_address"
                                                                       class="form-control fields_are_required"
                                                                       value="<?php echo parse_url($config['ext_address'],PHP_URL_HOST)?>">
                                                            </div>
                                                            <div class="col-md-2">
                                                                <input type="text" name="ext_address_port"
                                                                       id="ext_address_port"
                                                                class="form-control fields_are_required port"
                                                                value="<?php echo $ext_address_port ? $ext_address_port : '80' ?>">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="ext_address-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--status app b24 -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="status_pay_b24_modal"><?php echo _("The app's payment status")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="status_pay_b24_modal"></i>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <a href="javascript:void(0);" id="status_pay_b24_modal">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="status_pay_b24_modal-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END status app b24-->

                                        <!--active before-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="active_before_modal"><?php echo _("License active till")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="active_before_modal"></i>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <a href="javascript:void(0);" id="active_before_modal">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="active_before_modal-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END active before-->

                                        <!--extensions count from b24 -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="extensions_count_modal"><?php echo _("Users with extensions")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="extensions_count_modal"></i>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <a href="javascript:void(0);"
                                                                   id="extensions_count_modal">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="extensions_count_modal-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END extensions count from b24-->
                                    </div>
                                    <div class="fpbx-container modal-footer">
                                        <div class="row">
                                            <div class="submit-button row text-center">
                                                <div class='btn btn-primary' name='regDataSubmit'
                                                        id="regDataSubmit"><?php echo _("Submit")?></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END Registration Data -->

                        <!--InboundDestinations -->
                        <div id="InboundDestinations" tabindex="-1" class="modal modal_table fade in" role="dialog">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Inbound Destinations")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <div id="toolbar-all-inbound_modal">
                                            <a data-target="#add_inbound_modal" class="btn btn-primary inbound_dest_add"
                                               id="inbound_dest_add_window" data-toggle="modal">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>
                                        <table id="inbound_destinations_table_modal"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["inbound_destinations_table","getDidsList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-inbound_modal"
                                               data-maintain-selected="true"
                                               data-search="true"
                                               data-pagination="true""
                                               data-page-list = "[10, 20, 30, 'all']"
                                               data-toggle="table" class="table table-striped table-hover">
                                            <thead>
                                            <tr>
                                                <th data-field="id">#</th>
                                                <th data-field="description" data-align="center" data-valign="middle"><?php echo _("Description")?></th>
                                                <th data-field="defuser" data-align="center" data-valign="middle"><?php echo _("Default User")?></th>
                                                <th data-field="did" data-align="center" data-valign="middle"><?php echo _("Used as Destination")?></th>
                                                <th data-field="destination"><?php echo _("Destination")?></th>
                                                <th data-field="actions" class="col-md-2" data-align="center" data-valign="middle"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END InboundDestinations -->

                        <!--OutboundRoutes -->
                        <div id="OutboundRoutes" tabindex="-1" class="modal modal_table fade in" role="dialog">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Outbound Routes")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <div id="toolbar-all-outbound_modal"></div>
                                        <table id="outbound_table_modal"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["outbound_routes_table","getOutboundRoutesList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-outbound_modal"
                                               data-maintain-selected="true"
                                               data-search="true"
                                               data-pagination="true"
                                               data-page-list = "[10, 20, 30, 'all']"
                                               data-toggle="table" class="table table-striped table-hover">
                                            <thead>
                                            <tr>
                                                <th data-field="name" data-align="center" data-valign="middle"><?php echo _("Description")?></th>
                                                <th data-field="status" data-align="center" data-valign="middle" data-sortable="true"><?php echo _("Status")?></th>
                                                <th data-field="actions" data-align="center" data-valign="middle" class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END OutboundRoutes -->

                        <!--Lines -->
                        <div id="Lines" tabindex="-1" class="modal modal_table fade in" role="dialog">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Lines")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <div id="toolbar-all-lines_modal">
                                            <a class="btn btn-primary" id="lines_add_button" data-target="#addLine" data-toggle="modal">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>
                                        <table id="Lines_panel_table_modal"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["Lines_panel_table","getLinesList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-lines_modal"
                                               data-maintain-selected="true"
                                               data-toggle="table"
                                               data-pagination="true"
                                               data-page-list = "[10 , 15, 20, 'All']"
                                               data-search="true"
                                               data-row-style="LinesrowStyle"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="lines-did" data-align="center" data-valign="middle"><?php echo _("DID")?></th>
                                                <th data-field="number" data-align="center" data-valign="middle"><?php echo _("Number")?></th>
                                                <th data-field="prefix" data-align="center" data-valign="middle" data-cell-style="LinescellStyle"><?php echo _("Prefix")?></th>
                                                <th data-field="used" data-align="center" data-valign="middle"><?php echo _("Used in")?></th>
                                                <th data-field="actions" data-align="center" data-valign="middle"
                                                    class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END Lines -->

                        <!--Tasks -->
                        <div id="TasksModal" tabindex="-1" class="modal modal_table fade in" role="dialog">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Tasks")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <div id="toolbar-all-task_modal">
                                            <a class="btn btn-primary" data-target="#addTask" data-toggle="modal" id="task_add_button">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>

                                        <table id="tasks_modal_table"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["tasks_table","getTasksList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-task_modal"
                                               data-maintain-selected="true" data-toggle="table"
                                               data-pagination="true"
                                               data-page-list = "[10 , 15, 20, 'All']"
                                               data-search="true"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="task_name" data-align="center"><?php echo _("Task name")?></th>
                                                <th data-field="observers"><?php echo _("Observers")?></th>
                                                <th data-field="deadline" data-align="center"><?php echo _("Deadline")?></th>
                                                <th data-field="used"><?php echo _("Used in")?></th>
                                                <th data-field="actions" data-align="center"
                                                    class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END Tasks -->

                        <!--Exceptions -->
                        <div id="ExceptionsModal" tabindex="-1" class="modal modal_table fade in" role="dialog">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Exceptions")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <div id="toolbar-all-exception_modal">
                                            <a class="btn btn-primary" id="exception_add_button" data-target="#addException" data-toggle="modal">
                                                <i class="fa fa-plus"></i> <?php echo _('Add')?>
                                            </a>
                                        </div>
                                        <table id="exceptions_grid_modal"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["exceptions_grid","getExceptionsList"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-exception_modal"
                                               data-maintain-selected="true" data-toggle="table"
                                               data-pagination="true"
                                               data-page-size = "5"
                                               data-page-list = "[5, 10 , 15, 20]"
                                               data-search="true"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th data-field="description" data-align="center" data-valign="middle"><?php echo _("Description")?></th>
                                                <th data-field="used" data-align="center" data-valign="middle"><?php echo _("Used in")?></th>
                                                <th data-field="actions" data-align="center" data-valign="middle"
                                                    class="col-md-2"><?php echo _("Actions")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END Exceptions -->

                        <!--CallbacksModal -->
                        <div id="CallbacksModal" tabindex="-1" class="modal modal_table fade in" role="dialog">
                            <div class="modal-dialog ">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"><?php echo _("Call Back Destinations")?></h2>
                                    </div>
                                    <div class="modal-body">
                                        <table id="CallbacksTableModal"
                                               data-ajax="getIDtable"
                                               data-ajax-options = '["CallbacksTable","getCallBacks"]'
                                               data-cache="false"
                                               data-toolbar="#toolbar-all-callbacks_modal"
                                               data-maintain-selected="true"
                                               data-toggle="table"
                                               data-unique-id="line"
                                               data-pagination="true"
                                               data-side-pagination="client"
                                               data-page-list = "[10 , 15, 20, 'All']"
                                               class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th class="col-md-3" data-field="line" data-align="center" data-valign="middle"><?php echo _("Line Number")?></th>
                                                <th data-field="destination"><?php echo _("Destination")?></th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END CallbacksModal -->

                        <!--Modal Actions -->
                        <!--Add Inbound-->
                        <div id="add_inbound_modal" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title"></h2>
                                    </div>
                                    <div class="modal-body">
                                            <!-- hide id when update form -->
                                            <span id="inboundID" style="display: none;" data-id=""></span>
                                            <!--Description-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="description"><?php echo _("Description")?></label>
                                                                </div>
                                                                <div class="col-md-8">
                                                                    <input class="form-control" id="description" name="description" value="" type="text">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                            <!--END Description-->
                                            <!--Default User-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="users-from-portal"><?php echo _("Default User")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="users-from-portal"></i>
                                                                </div>
                                                                <div class="col-md-8 selectSingle"
                                                                     data-placement="users-from-portal">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="users-from-portal-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Default User-->
                                            <!-- Call Registration Priority-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="regPriority"><?php echo _("Call Registration Priority") ?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="regPriority"></i>
                                                                </div>
                                                                <div class="col-md-8">
                                                                    <select multiple class="form-control" id="regPriority"
                                                                            name="regPriority">
                                                                        <option value="DEFAULT"><?php echo _('Default') ?></option>
                                                                        <option value="LEAD"><?php echo _('Lead') ?></option>
                                                                        <option value="CONTACT"><?php echo _('Contact') ?></option>
                                                                        <option value="COMPANY"><?php echo _('Company') ?></option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                            <span id="regPriority-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- End Call Registration Priority-->
                                            <!--Exceptions-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="exceptions-options"><?php echo _("Exceptions") ?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="exceptions-options"></i>
                                                                </div>
                                                                <div class="col-md-8"
                                                                     data-placement="exceptions-options">

                                                                    <select class="form-control" id="exceptions"
                                                                            name="exceptions">
                                                                        <option value="">== choose one ==</option>
                                                                        <?php
                                                                        if(is_array($exceptions))
                                                                        foreach($exceptions as $exception):?>
                                                                        <option value="<?php echo $exception['id']?>"><?php echo $exception['description']?></option>
                                                                        <?php endforeach?>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="exceptions-options-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END-Exceptions-->
                                            <!--Show Caller Name-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="show_caller_name"><?php echo _("Show Caller Name")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="show_caller_name"></i>
                                                                </div>
                                                                <div class="col-md-8 radioset">
                                                                    <input id="show_caller_name_yes_add"
                                                                           name="show_caller_name" value="yes"
                                                                           type="radio">
                                                                    <label for="show_caller_name_yes_add"><?php echo _("Yes")?></label>
                                                                    <input id="show_caller_name_no_add"
                                                                           name="show_caller_name" value="no"
                                                                           type="radio" checked="checked">
                                                                    <label for="show_caller_name_no_add"><?php echo _("No")?></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="show_caller_name-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Show Caller Name-->
                                            <!-- Add To Chat -->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="add_to_chat"><?php echo _("Add to chat")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="add_to_chat"></i>
                                                                </div>
                                                                <div class="col-md-8 radioset">
                                                                    <input id="add_to_chat_no_add" name="add_to_chat"
                                                                           value="no" type="radio" checked="checked">
                                                                    <label for="add_to_chat_no_add"><?php echo _("No")?></label>
                                                                    <input id="add_to_chat_answer_add"
                                                                           name="add_to_chat" value="NoAnswered"
                                                                           type="radio">
                                                                    <label for="add_to_chat_answer_add"><?php echo _("Unanswered")?></label>
                                                                    <input id="add_to_chat_all_add" name="add_to_chat"
                                                                           value="All" type="radio">
                                                                    <label for="add_to_chat_all_add"><?php echo _("All")?></label>

                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="add_to_chat-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- End Add To Chat -->
                                            <!-- Assign to Unanswered Call-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="assign"><?php echo _("Assign to Unanswered Call")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="assign"></i>
                                                                </div>
                                                                <div class="col-md-8 radioset">
                                                                    <input id="assign_default" name="assign"
                                                                           value="default" type="radio"
                                                                           checked="checked">
                                                                    <label for="assign_default"><?php echo _("Default User")?></label>
                                                                    <input id="assign_manager" name="assign"
                                                                           value="manager" type="radio">
                                                                    <label for="assign_manager"><?php echo _("Assigned Manager")?></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="assign-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Assign to Unanswered Call-->
                                            <!-- Tasks -->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="did_tasks"><?php echo _("Create Task On Unanswered Call")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="did_tasks"></i>
                                                                </div>
                                                                <div class="col-md-8">
                                                                    <select name="did_tasks" class="form-control did_tasks" id="did_tasks">
                                                                        <option value=""><?php echo _("Disabled")?></option>
                                                                        <?php
                                                                        if(is_array($tasks))
                                                                        foreach($tasks as $task):?>
                                                                        <option value="<?php echo $task['id']?>"><?php echo $task['task_name']?></option>
                                                                        <?php endforeach?>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="did_tasks-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- END Tasks -->
                                            <!-- start show card -->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="show_card"><?php echo _("Show Card")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="show_card"></i>
                                                                </div>
                                                                <div class="col-md-8 radioset">
                                                                    <input id="show_card_yes_add" name="show_card"
                                                                           value="yes" type="radio">
                                                                    <label for="show_card_yes_add"><?php echo _("Yes")?></label>
                                                                    <input id="show_card_no_add" name="show_card"
                                                                           value="no" type="radio">
                                                                    <label for="show_card_no_add"><?php echo _("No")?></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="show_card-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- end show card -->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="create_lead"><?php echo _("Create Lead")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="create_lead"></i>
                                                                </div>

                                                                <div class="col-md-8 radioset">
                                                                    <input id="create_lead_yes_add" name="create_lead"
                                                                           value="yes" type="radio">
                                                                    <label for="create_lead_yes_add"><?php echo _("Yes")?></label>
                                                                    <input id="create_lead_no_add" name="create_lead"
                                                                           value="no" type="radio">
                                                                    <label for="create_lead_no_add"><?php echo _("No")?></label>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="create_lead-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--Source-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="source-options"><?php echo _("Source") ?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="source-options"></i>
                                                                </div>
                                                                <div class="col-md-8" data-placement="source-options">
                                                                    <div id="floatBarsG">
                                                                        <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                        <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="source-options-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END-Source-->
                                            <!--Manager-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="row">
                                                                    <div class="form-group">
                                                                        <div class="col-md-4">
                                                                            <label class="control-label"
                                                                                   for="manager_in_charge"><?php echo _("Destination for registered callers")?></label>
                                                                            <i class="fa fa-question-circle fpbx-help-icon"
                                                                               data-for="manager_in_charge"></i>
                                                                        </div>
                                                                        <div class="col-md-3">
                                                                            <div class="manager_in_charge_ajax">
                                                                            <?php echo $destinationSelectsManager ?>
                                                                            </div>
                                                                        </div>
                                                                        <div hidden class="show_div_ringtimer">
                                                                            <div class="col-md-3">
                                                                                <label class="control-label"
                                                                                       for="assigned_manager_ring_timer"><?php echo _("Ring Time")?></label>
                                                                            </div>
                                                                            <div class="col-md-3">
                                                                                <input class="form-control"
                                                                                       id="assigned_manager_ring_timer"
                                                                                       name="assigned_manager_ring_timer"
                                                                                       value="" type="text">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="manager_in_charge-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Manager-->
                                            <!--Assessment-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="assessment"><?php echo _("Assessment of service")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="assessment"></i>
                                                                </div>
                                                                <div class="col-md-8 radioset">
                                                                    <input id="record_yes" name="assessment" value="yes"
                                                                           type="radio">
                                                                    <label for="record_yes"><?php echo _("Yes")?></label>
                                                                    <input id="record_no" name="assessment" value="no"
                                                                           type="radio" checked="checked">
                                                                    <label for="record_no"><?php echo _("No")?></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="assessment-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Assessment-->
                                            <!--Initial Message-->
                                            <div class="element-container show_div_greet" style="display: none;">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="greatings"><?php echo _("Initial message") ?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="greatings"></i>
                                                                </div>
                                                                <div class="col-md-8">
                                                                    <select class="form-control" id="greatings"
                                                                            name="greatings">
                                                                        <?php echo $greatings?>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="greatings-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Initial Message-->
                                            <!--Finish Message-->
                                            <div class="element-container show_div_bye" style="display: none;">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="bye"><?php echo _("Final message") ?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="bye"></i>
                                                                </div>
                                                                <div class="col-md-8">
                                                                    <select class="form-control" id="bye" name="bye">
                                                                        <?php echo $bye?>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="bye-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Finish Message-->
                                            <!--Destination-->
                                            <div class="element-container">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row">
                                                            <div class="form-group">
                                                                <div class="col-md-4">
                                                                    <label class="control-label"
                                                                           for="dest_ajax"><?php echo _("Destination")?></label>
                                                                    <i class="fa fa-question-circle fpbx-help-icon"
                                                                       data-for="dest_ajax"></i>
                                                                </div>
                                                                <div class="col-md-8">
                                                                    <div class="dest_ajax"><?php echo $destinationSelects?></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <span id="dest_ajax-help" class="help-block fpbx-help-block"></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <!--END Destination-->
                                    </div>
                                    <div class="fpbx-container modal-footer">
                                        <div class="row">
                                            <div class="submit-button row text-center">
                                                <button class='btn btn-primary' type='submit' id="modal_addInbound_ok"
                                                        name='submit_inbound_modal_btn'><?php echo _("Submit")?></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--END Add Inbound-->

                        <!--Edit Outbound-->
                        <div id="edit_outbound_modal" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="modal-title"></h2>
                                    </div>
                                    <div class="modal-body">
                                        <!-- hide id when update form -->
                                        <span id="outboundID" class="update_form" style="display: none;" data-id=""></span>
                                        <!--Description-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="description"><?php echo _("Description")?></label>
                                                            </div>
                                                            <div class="col-md-8">
                                                                <input class="form-control" id="description"
                                                                       name="description" value="" type="text" disabled>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Description-->
                                        <!--Status-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="status_mode"><?php echo _("Status")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="status_mode"></i>
                                                            </div>
                                                            <div class="col-md-8 radioset">
                                                                <input id="record_enabled_update" name="status_mode"
                                                                       value="yes" type="radio">
                                                                <label for="record_enabled_update"><?php echo _("Enabled")?></label>
                                                                <input id="record_disabled_update" name="status_mode"
                                                                       value="no" type="radio">
                                                                <label for="record_disabled_update"><?php echo _("Disabled")?></label>

                                                                <input id="record_assessment_update" name="status_mode"
                                                                       value="voting" type="radio">
                                                                <label for="record_assessment_update"><?php echo _("Assessment")?></label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="status_mode-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Status-->
                                        <!--Greatings Message-->
                                        <div class="element-container show_div" style="display: none;">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_greatings"><?php echo _("Initial message") ?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_greatings"></i>
                                                            </div>
                                                            <div class="col-md-8">
                                                                <select class="form-control" id="greatings"
                                                                        name="greatings">
                                                                    <?php echo $greatings?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_greatings-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END-Greatings Message-->
                                        <!--Thanks Message-->
                                        <div class="element-container show_div" style="display: none;">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_bye"><?php echo _("Final message") ?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_bye"></i>
                                                            </div>
                                                            <div class="col-md-8">
                                                                <select class="form-control" id="bye" name="bye">
                                                                    <?php echo $bye?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_bye-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END-Thanks Message-->
                                        <!-- Call Registration Priority-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="OutboundregPriority"><?php echo _("Call Registration Priority") ?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="OutboundregPriority"></i>
                                                            </div>
                                                            <div class="col-md-8">
                                                                <select multiple class="form-control" id="OutboundregPriority"
                                                                        name="regPriority" value="defailt">
                                                                    <option value="DEFAULT"><?php echo _('Default') ?></option>
                                                                    <option value="LEAD"><?php echo _('Lead') ?></option>
                                                                    <option value="CONTACT"><?php echo _('Contact') ?></option>
                                                                    <option value="COMPANY"><?php echo _('Company') ?></option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                        <span id="OutboundregPriority-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End Call Registration Priority-->
                                        <!--Exception-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_exceptions"><?php echo _("Exceptions") ?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_exceptions"></i>
                                                            </div>
                                                            <div class="col-md-8" data-placement="out_exceptions">
                                                                <select class="form-control" id="exceptions"
                                                                        name="exceptions">
                                                                    <option value="">== choose one ==</option>
                                                                    <?php
                                                                        if(is_array($exceptions))
                                                                        foreach($exceptions as $exception):?>
                                                                    <option value="<?php echo $exception['id']?>"><?php echo $exception['description']?></option>
                                                                    <?php endforeach?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_exceptions-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END-Exception-->
                                        <!--Source-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_source_route"><?php echo _("Source") ?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_source_route"></i>
                                                            </div>
                                                            <div class="col-md-8" data-placement="source-options">
                                                                <div id="floatBarsG">
                                                                    <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_source_route-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END-Source-->
                                        <!--Show Card-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_show_card"><?php echo _("Show Card")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_show_card"></i>
                                                            </div>

                                                            <div class="col-md-8 radioset">
                                                                <input id="show_card_route_yes" name="show_card_route"
                                                                       value="yes" type="radio"">
                                                                <label for="show_card_route_yes"><?php echo _("Yes")?></label>
                                                                <input id="show_card_route_no" name="show_card_route"
                                                                       value="no" type="radio">
                                                                <label for="show_card_route_no"><?php echo _("No")?></label>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_show_card-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Show Card-->
                                        <!--Create Lead-->
                                        <div class="element-container">
                                            <div class="row ">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_create_lead"><?php echo _("Create Lead")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_create_lead"></i>
                                                            </div>
                                                            <div class="col-md-8 radioset">
                                                                <input id="create_lead_yes" name="create_lead"
                                                                       value="yes" type="radio">
                                                                <label for="create_lead_yes"><?php echo _("Yes")?></label>
                                                                <input id="create_lead_no" name="create_lead" value="no"
                                                                       type="radio">
                                                                <label for="create_lead_no"><?php echo _("No")?></label>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_create_lead-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Create Lead-->
                                        <!--Advanced Settings-->
                                        <a class="showNumberModify"><?php echo _("Advanced Settings")?></a>
                                        <div class="element-container showNumberModifyInput">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-4">
                                                                <label class="control-label"
                                                                       for="out_number_modify"><?php echo _("Number Modification for Bitrix24")?></label>
                                                                <i class="fa fa-question-circle fpbx-help-icon"
                                                                   data-for="out_number_modify"></i>
                                                            </div>
                                                            <div class="col-md-8">
                                                                <input class="form-control" placeholder="${EXTEN}"
                                                                       id="modify_number_first"
                                                                       name="modify_number_first" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <span id="out_number_modify-help" class="help-block fpbx-help-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Advanced Settings-->
                                    </div>
                                    <div class="fpbx-container modal-footer">
                                        <div class="row">
                                            <div class="submit-button row text-center">
                                                <button class='btn btn-primary' type='submit' id="modal_outbound_ok"
                                                        name='modal_outbound_ok'><?php echo _("Submit")?></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Edit Outbound-->

                        <!--Add Line-->
                        <div id="addLine" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-md">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title"></h2>
                                    </div>
                                    <div class="panel-body">
                                        <span id="lineID" style="display: none;" data-id=""></span>
                                        <!--DID-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="did"><?php echo _("DID")?></label>
                                                            </div>
                                                            <div class="col-md-9">
                                                                <input class="form-control" id="did" name="did" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END DID-->

                                        <!--Number-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="number"><?php echo _("Number")?></label>
                                                            </div>
                                                            <div class="col-md-9">
                                                                <input class="form-control" id="number" name="number" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Number-->

                                        <!--Outbound Prefix-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="prefix"><?php echo _("Outbound Prefix")?></label>
                                                            </div>
                                                            <div class="col-md-9">
                                                                <input class="form-control" id="prefix" name="prefix" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Outbound Prefix-->
                                    </div>
                                    <div class='modal-footer '>
                                       <button class='btn' id='modal_addLine_ok'>Ok</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Add Line-->

                        <!--Add Task-->
                        <div id="addTask" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-md">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title"></h2>
                                    </div>
                                    <div class="panel-body">
                                        <span id="taskID" style="display: none;" data-id=""></span>
                                        <!-- Название -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="task_name"><?php echo _("Task name")?></label>
                                                            </div>
                                                            <div class="col-md-9">
                                                                <input class="form-control" id="task_name" name="task_name" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Название-->

                                        <!-- Наблюдатели -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="selectMulti"><?php echo _("Observers")?></label>
                                                            </div>
                                                            <div class="col-md-9 selectMulti" id="Observers">
                                                                <div id="floatBarsG">
                                                                    <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Наблюдатели-->

                                        <!-- Крайний срок -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="deadline"><?php echo _("Deadline")?></label>
                                                            </div>
                                                            <div class="col-md-6">
                                                                <input class="form-control" id="deadline" name="deadline" value="" type="text">
                                                            </div>
                                                            <div class="col-md-3">
                                                                <select id="deadlineMeasure" name="deadlineMeasure" class="form-control">
                                                                    <option value="Hours" selected><?php echo _('Hours')?></option>
                                                                    <option value="Days"><?php echo _('Days')?></option>
                                                                    <option value="Minutes"><?php echo _('Minutes')?></option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Крайний срок-->
                                    </div>
                                    <div class='modal-footer '>
                                        <button class='btn' id='modal_addTask_ok'>Ok</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Add Task-->

                        <!--Add Exception-->
                        <div id="addException" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-md">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title"></h2>
                                    </div>
                                    <div class="panel-body">
                                        <span id="exceptionID" style="display: none;" data-id=""></span>
                                        <!-- Название -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="description"><?php echo _("Description")?></label>
                                                            </div>
                                                            <div class="col-md-9">
                                                                <input class="form-control" id="description" name="description" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Название-->

                                        <!-- Участники -->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-3">
                                                                <label class="control-label" for="selectMulti"><?php echo _("Members")?></label>
                                                            </div>
                                                            <div class="col-md-9 selectMulti" id="Members" >
                                                                <div id="floatBarsG">
                                                                    <div id="floatBarsG_1" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_2" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_3" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_4" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_5" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_6" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_7" class="floatBarsG"></div>
                                                                    <div id="floatBarsG_8" class="floatBarsG"></div>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Участники-->

                                    </div>
                                    <div class='modal-footer '>
                                        <button class='btn' id='modal_addException_ok'>Ok</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Add Exception-->

                        <!--Delete-->
                        <div id="modal_delete" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-md">
                                <div class="modal-content panel-danger">
                                    <div class="panel-heading">
                                        <h2 class="panel-title"></h2>
                                    </div>
                                    <div class="panel-body">
                                        <h2><?php echo _("These items will be deleted and cannot be recovered in the future. Do you want to proceed?") ?></h2>
                                    </div>
                                    <div class='modal-footer '>
                                        <button class='btn btn-default' data-dismiss='modal' aria-hidden='true'>Cancel
                                        </button>
                                        <button class='btn' id='modal_delete_button_ok' data-dismiss='modal'>Ok</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Delete-->

                        <!--invalid version-->
                        <div id="not_supported_version" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-md">
                                <div class="modal-content panel-danger">
                                    <div class="panel-heading">
                                        <h2 class="panel-title"><?php echo _('To Sofphone24 work, you need a Asterisk verson 13.15.0 or higher')?>.</h2>
                                    </div>
                                    <div class='modal-footer '>
                                        <button class='btn btn-default' data-dismiss='modal' aria-hidden='true'>Ok</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End invalid version-->

                        <!--Access Code-->
                        <div id="modal_access_code" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-md">
                                <div class="modal-content panel-danger">
                                    <div class="panel-heading">
                                        <h2 class="panel-title"><?php echo _("Access Code") ?></h2>
                                    </div>
                                    <div class="panel-body">
                                        <!--Access Code-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-12">
                                                                <input class="form-control" id="access_code"
                                                                       name="access_code" value="" type="text">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>
                                        <!--END Description-->
                                    </div>
                                    <div class='modal-footer '>
                                        <button class='btn btn-default' data-dismiss='modal' aria-hidden='true'><?php echo _("Return") ?>
                                        </button>
                                        <button class='btn btn-primary' id='modal_register_ok' data-dismiss='modal'>
                                            <?php echo _("Register") ?>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Access Code-->

                        <!--ONEXTERNALCALLSTART-->
                        <div id="modal_ONEXTERNALCALLSTART" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title">ClickToCall</h2>
                                    </div>
                                    <div class="panel-body">
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <?php if($autorized):?>
                                                    <table id="event-list-callstart"
                                                           data-url="ajax.php?module=iub24&amp;command=isEventRegister&event=ONEXTERNALCALLSTART"
                                                           data-cache="false" data-maintain-selected="true"
                                                           data-toggle="table" data-pagination="true" data-search="true"
                                                           class="table table-striped">
                                                        <thead>
                                                        <tr>
                                                            <th data-field="eventCode" class="col-md-6"><?=_("Event")?></th>
                                                            <th data-field="handler" class="col-md-4"><?=_("Handler")?></th>
                                                            <th data-field="actions"
                                                                class="col-md-2"><?php echo _("Actions")?></th>
                                                        </tr>
                                                        </thead>
                                                    </table>
                                                    <?php endif?>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End ONEXTERNALCALLSTART-->

                        <!--ONEXTERNALCALLBACKSTART-->
                        <div id="modal_ONEXTERNALCALLBACKSTART" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-lg">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title">CallBack</h2>
                                    </div>
                                    <div class="panel-body">
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <?php if($autorized):?>
                                                    <table id="event-list-callbackstart"
                                                           data-url="ajax.php?module=iub24&amp;command=isEventRegister&event=ONEXTERNALCALLBACKSTART"
                                                           data-cache="false" data-maintain-selected="true"
                                                           data-toggle="table" data-pagination="true" data-search="true"
                                                           class="table table-striped">
                                                        <thead>
                                                        <tr>
                                                            <th data-field="eventCode" class="col-md-6"><?=_("Event")?></th>
                                                            <th data-field="handler" class="col-md-4"><?=_("Handler")?></th>
                                                            <th data-field="actions"
                                                                class="col-md-2"><?php echo _("Actions")?></th>
                                                        </tr>
                                                        </thead>
                                                    </table>
                                                    <?php endif?>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End ONEXTERNALCALLBACKSTART-->

                        <!--Softphone Check-->
                        <div id="softphoneCheck_modal" tabindex="-1" class="modal" role="dialog">
                            <div class="modal-dialog modal-sm modal-dialog-centered">
                                <div class="modal-content panel-info">
                                    <div class="panel-heading">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <h2 class="panel-title"><?php echo _("Softphone24 Settings") ?></h2>
                                    </div>
                                    <div class="panel-body">
                                        <!--miniHttpsServ-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-10">
                                                                <label class="control-label" for="miniHttpsServ"><?php echo _("mini-HTTP Server")?></label>
                                                            </div>
                                                            <div class="col-md-2" id="miniHttpsServ">
                                                                <i class="fa fa-check-circle hidden" style="color: green"></i>
                                                                <i class="fa fa-exclamation-triangle hidden" style="color: red"></i>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END miniHttpsServ-->

                                        <!--TLS for the mini-HTTP Server-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-10">
                                                                <label class="control-label" for="TLSminiServ"><?php echo _("TLS for the mini-HTTP Server")?></label>
                                                            </div>
                                                            <div class="col-md-2" id="TLSminiServ">
                                                                <i class="fa fa-check-circle hidden" style="color: green"></i>
                                                                <i class="fa fa-exclamation-triangle hidden" style="color: red"></i>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END TLS for the mini-HTTP Server-->

                                        <!--Certificate configuration-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-10">
                                                                <label class="control-label" for="configSertificate"><?php echo _("Certificate configuration")?></label>
                                                            </div>
                                                            <div class="col-md-2" id="configSertificate">
                                                                <i class="fa fa-check-circle hidden" style="color: green"></i>
                                                                <i class="fa fa-exclamation-triangle hidden" style="color: red"></i>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END Certificate configuration-->

                                        <!--External WSS Port-->
                                        <div class="element-container">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-6">
                                                                <label class="control-label" for="externalWSSPort"><?php echo _("External WSS Port")?></label>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <input class="form-control" placeholder="<?=$externalWssPort?>" id="externalWSSPort" name="externalWSSPort" value="" type="input">

                                                            </div>
                                                            <div class="col-md-2">
                                                                <div id="externalWSSPortSave">
                                                                    <i class="fa fa-check-circle hidden" style="color: green"></i>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--END External WSS Port-->
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Softphone Check-->
                        <?php if($config['check_cc']){ ?>
                            <!--Custom contexts-->
                            <div id="modal_custom_contexts" tabindex="-1" class="modal" role="dialog">
                                <div class="modal-dialog modal-md">
                                    <div class="modal-content panel-warning">
                                        <div class="panel-heading">
                                            <h2 class="panel-title"><?php echo _("The standard contexts are overwritten. It can affect the module's functioning.") ?></h2>
                                        </div>
                                        <div class="panel-body">
                                            <table id="custom_context_table"
                                                   data-url="ajax.php?module=iub24&amp;command=getReassignedContexts"
                                                   data-cache="false"
                                                   data-maintain-selected="true"
                                                   data-toggle="table"
                                                   class="table table-striped">
                                                <thead>
                                                <tr>
                                                    <th data-field="context" data-align="center" data-valign="middle"><?php echo _("Context")?></th>
                                                    <th data-field="file" data-align="center" data-valign="middle"><?php echo _("File")?></th>
                                                </tr>
                                                </thead>
                                            </table>
                                        </div>
                                        <div class='modal-footer '>
                                            <div class="col-md-5 text-left">
                                                <input type="checkbox"  name="check_cc" id="check_cc" checked>
                                                <label for="check_cc"><?php echo _("Check contexts")?></label>
                                            </div>
                                            <div class="col-md-7">
                                                <button class='btn btn-default' data-dismiss='modal' aria-hidden='true'><?php echo _("Ok") ?>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--Custom contexts-->
                        <?php } ?>
                        <!--Modal Actions -->
                        <!--END MODAL-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<?php echo $textHelpers ?>

<?php if($_REQUEST['didID']){ ?> <script type="text/javascript"> var didID = <?php echo $_REQUEST['didID']?>; </script> <?php }else{ ?> <script type="text/javascript"> var didID = undefined; </script> <?php } ?>
