<div class="control-group">
    <div class="controls">
        <div>
            <?= form_checkbox('create_c_install_file', '1', $this->input->post('create_c_install_file')) . ' ' . $this->lang->line('Create install controller') ?>
        </div>
        <div style="padding: 5px">
            <a class="btn btn-primary" data-toggle="collapse" href="#collapseicon" role="button" aria-expanded="false"
               aria-controls="collapseExample">
                <?= $this->lang->line('Select module icon') ?> <i class="fa fa-chevron-down"></i>
            </a>
        </div>
        <?php
        $icons = json_decode(file_get_contents(__DIR__ . '/../../data/fontawesome.json'), true);
        $selected_icon = $this->input->post('moduleIcon') ? $this->input->post('moduleIcon') : 'fa-tag';
        ?>
        <div id="collapseicon" class="collapse">
            <?php foreach (array_combine(array_column($icons, 'c'), array_column($icons, 'l')) as $icon_class => $icon_label) : ?>
                <label style="width: 200px; float: left">
                    <input type="radio" name="moduleIcon"
                           value="<?= $icon_class ?>" <?= $icon_class == $selected_icon ? 'checked' : '' ?>/>
                    <i class="fa <?= $icon_class ?>"></i> <?= $icon_label ?>
                </label>
            <?php endforeach; ?>
        </div>
    </div>
</div>
