<?php require_once(THEME_ROOT . '/blocks/head.php'); ?>
<?php require_once(THEME_ROOT . '/blocks/top.php'); ?>

    <br><br>
    <div class="container">
        <div class="row">
            <div class="col-md-offset-2 col-md-8">

                <div class="main" style="text-align:center;">
                    <h3><?php echo T('Настройки'); ?></h3>
                </div>

                <ul class="nav nav-tabs" style="margin-bottom:10px;" >
                    <li>
                        <a href="/user/settings"><?php echo T('Личные данные');?>
                        </a>
                    </li>
                    <li>
                        <a href="/user/save_password">
                            <?php echo T('Сменить пароль');?>
                        </a>
                    </li>
                    <li class="active">
                        <a href="/user/wallets">
                            <?php echo T('Реквизиты');?>
                        </a>
                    </li>
                </ul>

                <div class="panel panel-default">
                    <div class="panel-body">
                        <form action="/handlers/user/save_wallets.php" method="post">
                            <?php echo flash_show('save_wallets'); ?>
                            <?php echo form_init(); ?>
                            <?php foreach (get_payment_system('settings') as $item) {
                                $attr = login_get_wallet($login, $item['value'])
                                    ?
                                    'value="'.escape(login_get_wallet($login, $item['value'])).'" readonly'
                                    :
                                    'placeholder="'.escape($item['placeholder']).'"';
                                ?>
                                <div class="input-group">
                                    <span class="input-group-addon">
                                        <svg width="70" height="20" role="img">
                                            <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#bm_icon_payment_colored_<?php echo strtolower(escape($item['value'])); ?>"></use>
                                        </svg>
                                    </span>

                                    <input
                                            type="text" class="form-control"
                                            name="<?php echo escape($item['value']); ?>"
                                            <?php echo $attr; ?>>
                                </div>
                                <br>
                            <?php  } ?>
                            <input type="submit" value="<?php echo T('Сохранить изменения'); ?>" class="btn btn-default btn-md" style="width: 100%">
                        </form>
                    </div>
                </div>
            </div>

        </div>
    </div>

<?php
require_once(THEME_ROOT."/blocks/footer.php");
?>
