{include file="./index_top.tpl"}
<script language="JavaScript" type="text/javascript">
    // значения для системной подсказки
    var help_section = 'Settings';
    var help_sub_section = 'Additional';
    
    var cur_system_lang = '{$config.system_lang}';
    function set_formats() {
        jconfirm('{$lang.change_format_alert}', 
            function() {
                cur_system_lang = $('[name="system_lang"]').val();
                $('[value="' + $('[value="' + cur_system_lang + '"]').attr('data-date-format') + '"]').prop('selected', true);
                $('[value="' + $('[value="' + cur_system_lang + '"]').attr('data-number-format') + '"]').prop('selected', true);
            },
            function() {
                $('[value="' + cur_system_lang + '"]').prop('selected', true);
            }
        );
    }
</script>
<div align=center>
    <br>{$lang.Favorites_settings}<span class='help_bt' h_id='Favorites'></span><br><br>
    <form action="edit_favorites.php" method="post">
        <table border=0 cellpadding=3>
            {if $message}
                <tr>
                    <td colspan=2 align=center>
                        <span style="color:green">{$message}</span><br><br>
                    </td>
                </tr>
            {/if}
            <tr>
                <td align=right>{$lang.Access}<span class='help_bt' h_id='groups_use_favorites'></span>:</td>
                <td width="50%">
                    {foreach from=$groups item=one_group}
                        <input type="checkbox" name="groups_use_favorites[{$one_group.id}]" value=1 
                            {if $config.groups_use_favorites[{$one_group.id}] == 1}checked{/if}> {$one_group.name}<br>
                    {/foreach}
                </td>
            </tr>
            <tr>
                <td align=right>{$lang.send_events_favorites}<span class='help_bt' h_id='send_events_favorites'></span>:</td>
                <td width="50%">
                    <input type="checkbox" name="send_events_favorites[email]" value=1 {if $config.send_events_favorites.email}checked{/if}> E-mail<br>
                    <input type="checkbox" name="send_events_favorites[wazzup]" value=1 {if $config.send_events_favorites.wazzup}checked{/if}> Wazzup
                </td>
            </tr>
            <tr>
                <td align=right>{$lang.type_events_favorites}<span class='help_bt' h_id='type_events_favorites'></span>:</td>
                <td width="50%">
                    <input type="checkbox" name="type_events_favorites[view]" value=1 {if $config.type_events_favorites.view}checked{/if}> {$lang.View2}<br>
                    <input type="checkbox" name="type_events_favorites[edit]" value=1 {if $config.type_events_favorites.edit}checked{/if}> {$lang.Edit2}<br>
                    <input type="checkbox" name="type_events_favorites[copy]" value=1 {if $config.type_events_favorites.copy}checked{/if}> {$lang.Copying}<br>
                    <input type="checkbox" name="type_events_favorites[delete]" value=1 {if $config.type_events_favorites.delete}checked{/if}> {$lang.Deleting}<br>
                    <input type="checkbox" name="type_events_favorites[archive]" value=1 {if $config.type_events_favorites.archive}checked{/if}> {$lang.Archiving}<br>
                    <input type="checkbox" name="type_events_favorites[adt_actions]" value=1 {if $config.type_events_favorites.adt_actions}checked{/if}> {$lang.Additional_actions}
                </td>
            </tr>
            <tr>
                <td colspan=2 align=center>
                    <br><input class="btn btn-default btn-sm" type="submit" name='save' value="{$lang.Save}">
                    <input type=hidden name="csrf" value="{$csrf}">
                </td>
            </tr>
        </table>
    </form>
    <br>
    <a href="edit_add.php">{$lang.return_to_add_settings}</a><br><br>
</div>
