<section id="basic-vertical-layouts">
    <div class="card text-bg-dark">
        <div class="card-content">
            <div class="card-body">
                <form class="form form-vertical" id="editaccount" method="post" action="<?= base_url() ?>/editAccount">
                    <input type="hidden" value="<?= $id??0 ?>" name="id" id="id">
                    <?php if (! empty($validation)) : ?>
                        <div class='alert alert-danger mt-2'>
                            <div class="errors" role="alert">
                                <ul>
                                <?php foreach ($validation as $error) : ?>
                                    <li><?= esc($error) ?></li>
                                <?php endforeach ?>
                                </ul>
                            </div>
                        </div>
                    <?php endif; ?>
                    <div class="form-body">
                        <div class="row">
                            <div class="col-12">
                                <div class="form-group">
                                    <label for="description">Beschreibung</label>
                                    <input type="text" class="form-control" id="description" name="description" value="<?= $description??'' ?>">
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-group">
                                    <label for="parent">Überkonto:</label>
                                    <?= form_dropdown('parent', $ddlist, $parent??0,'id="parent" class="form-select"'); ?>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-check form-check-inline">
                                    <input class="form-check-input" type="checkbox" id="typeAccount" value="account" name="type" <?= set_radio('type', 'account') ?>>
                                    <label class="form-check-label" for="inlineCheckbox1">Konto</label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <input class="form-check-input" type="checkbox" id="typeInput" value="input" name="type" <?= set_radio('type', 'input') ?> >
                                    <label class="form-check-label" for="inlineCheckbox2">Einnahmen</label>
                                </div>
                                <div class="form-check form-check-inline">
                                    <input class="form-check-input" type="checkbox" id="typeOutput" value="output" name="type" <?= set_radio('type', 'output', true) ?> >
                                    <label class="form-check-label" for="inlineCheckbox3">Ausgaben</label>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-check form-switch">
                                    <label class="form-check-label" for="bookable">Buchbarkeit</label>
                                    <input class="form-check-input" type="checkbox" id="bookable" value="bookable" name="bookable" <?= set_checkbox('bookable', 'on', (($bookable??"f")=="t")?true:false) ?> >                                           
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-check form-switch">
                                    <label class="form-check-label" for="lkz">lkz</label>
                                    <input class="form-check-input" type="checkbox" id="lkz" value="1" name="lkz" <?= set_checkbox('lkz', '1', $lkz??false) ?>>                                           
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-group">
                                <button type="submit" class="btn btn-primary">Submit</button>
                                <a class="btn btn-secondary" onclick="history.back();" role="button">Zurück</a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>