<?php
$translation = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname    = "form_faq_config_list";
$inputname   = "input_group_id";
?>

<ul class="toolbar_menu">
    <?= button("new", $translation->get("new"), $formname, "loadCard('new_faq_setup_group', true)"); ?>

</ul>

<div id="mainContent">

    <?php echo current_website_language($site, $language); ?>
    <h1><?php echo get_translation('left_faq_config'); ?></h1>

    <form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
        <input type="hidden" class="selected_linklist_row" name="input_group_id" value="" />

        <div class="requestLoader"></div>
        <?
        $query = "SELECT main_faq_setup_group.id, description AS '" . $translation->get("description") . "', main_faq_setup_group.default_active as '" . $translation->get("state") . "' from main_faq_setup_group ORDER BY sorting asc";
        $format = array('option', 'text', 'boolean_active');
        if ($result = @mysqli_query($GLOBALS['mysql_con'], $query)) {
            linklist($result, $formname, $format, "input_group_id", "edit_group_faq_setup", TRUE, 'update_sortorder_faq_group');
        }
        ?>
    </form>

</div>