<!--main content start-->
<section id="main-content">
    <section class="wrapper">
        <div class="row">
            <div class="col-sm-12">
                <?= form_open(site_url('sliders/' . $sliders['id'] . '/edit'), 'role="form"'); ?>
                <section class="panel">
                    <header class="panel-heading">
                        Modification d'un Slider
                        <span class="tools pull-right">
                            <a href="javascript:;" class="fa fa-chevron-down"></a>
                        </span>
                    </header>
                    <div class="panel-body">
                        <div class="row">                          
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                <label class="control-label" for="title">Publie :</label>
                                <input type="radio" value="1" name="active" <?php if($sliders['active']=="1"){?>checked<?php } ?> class="radio-button"> Oui
                                <input type="radio" value="0" name="active" <?php if($sliders['active']=="0"){?>checked<?php } ?> class="radio-button"> Non
                            </div>
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                <div class="row">
                                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                        <div class="form-group<?= (form_error('sliders[title]') ? ' has-error' : ''); ?>">
                                            <label class="control-label" for="title">Titre :</label>
                                            <?= (form_error('sliders[title]') ? form_error('sliders[title]', ' <span class="help-inline"> | ', '</span>') : ''); ?>
                                            <?= form_input('sliders[title]', set_value('sliders[title]', $sliders['title']), 'class="form-control" placeholder="Titre" htmlEscape="true"'); ?>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                        <div class="form-group<?= (form_error('sliders[position]') ? ' has-error' : ''); ?>">
                                            <label class="control-label" for="position">Position :</label>
                                            <?= (form_error('sliders[position]') ? form_error('sliders[position]', ' <span class="help-inline"> | ', '</span>') : ''); ?>
                                            <?= form_input('sliders[position]', set_value('sliders[position]', $sliders['position']), 'class="form-control" placeholder="Position" htmlEscape="true"'); ?>
                                        </div>
                                    </div>    
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                    <div class="form-group">
                                        <label class="control-label">Miniature</label>
                                        <div class="fileupload fileupload-new">
                                            <div class="fileupload-new thumbnail" style="width: 200px; height: 150px;">
                                                <?php if (!empty($sliders['resource'])) { ?>
                                                    <img src="<?= base_url() . 'assets/uploads/' . $sliders['resource']['name']; ?>" alt="" />
                                                <?php } else { ?>
                                                    <img src="<?= images_url() . 'no-pic.png'; ?>" alt="" />
                                                <?php } ?>
                                            </div>
                                            <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
                                            <div>
                                                <span class="btn btn-white btn-file" style="border-color: rgba(150, 160, 180, 0.3);">
                                                    <span class="fileupload-new thumbnail-load"><i class="fa fa-paper-clip"></i>Charger</span>
                                                    <span class="fileupload-exists thumbnail-change"><i class="fa fa-undo"></i>Changer</span>
                                                </span>
                                                <a class="btn btn-danger fileupload-exists thumbnail-delete" data-dismiss="fileupload"><i class="fa fa-trash"></i> Supprimer</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <div class="row">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right">
                                    <input id="file" name="resource" type="hidden" value="" >
                                    <?= form_submit('submit', 'Modifier', 'class="btn btn-success btn-sm"'); ?>
                                </div>
                            </div>
                        </div>
                </section>
                <?= form_close(); ?>
            </div>
        </div>
        <!-- page end-->
    </section>
</section>
<!--main content end-->