<!-- MENU NAVBAR HEADER-->
<?php echo Modules::run('menuadmin/menubyactive',3);?>
<!-- /MENU NAVBAR HEADER -->

<section id="middle">


    <!-- page title -->
    <header id="page-header">
        <h1>Infobar</h1>
        <ol class="breadcrumb">
            <li><a href="#">Infobar</a></li>
            <li class="active"><?php echo $item!=NULL?"Edit":"Add"?></li>
        </ol>
    </header>
    <!-- /page title -->


    <div id="content" class="padding-20">

        <div class="row">
            <div class="panel panel-default">
                <div class="panel-heading panel-heading-transparent">
                    <strong><?php echo $item!=NULL?"Edit":"Add"?> Infobar</strong>

                </div>

                <div class="panel-body">

                    <form class="validate" id="infobarform" action="<?php echo base_url()?>infobar/add" method="post" enctype="multipart/form-data" data-success="Sent! Thank you!" data-toastr-position="top-right">

                        <fieldset>
                            <!-- required [php action request] -->
                            <input type="hidden" name="id" value="<?php echo @$item->id?>" />

                            <div class="row">
                                <div class="col-md-12 col-sm-12">

                                    <div class="tabs nomargin">

                                        <!-- tabs -->
                                        <ul class="nav nav-tabs">
                                            <?php foreach ($langs as $key => $lang){?>
                                                <li class="<?php echo $key==0?'active':''?>">
                                                    <a href="#tab<?php echo $key+1?>_title" data-toggle="tab">
                                                        <label>Title <?php echo strtoupper($lang->shorttitle)?> * </label>
                                                    </a>
                                                </li>
                                            <?php }?>
                                        </ul>

                                        <!-- tabs content -->
                                        <div class="tab-content ">
                                            <?php foreach ($langs as $key => $lang){?>
                                                <div id="tab<?php echo $key+1?>_title" class="tab-pane <?php echo $key==0?'active':''?>">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-12 col-sm-12">
                                                                <input type="text" name="title_<?php echo $lang->shorttitle?>" value="<?php echo @$item->{"title_".$lang->shorttitle}?>" class="form-control required">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            <?php }?>
                                        </div>
                                    </div>

                                    <hr>

                                    <div class="tabs nomargin">

                                        <!-- tabs -->
                                        <ul class="nav nav-tabs">
                                            <?php foreach ($langs as $key => $lang){?>
                                                <li class="<?php echo $key==0?'active':''?>">
                                                    <a href="#tab<?php echo $key+1?>_desc" data-toggle="tab">
                                                        <label>Description <?php echo strtoupper($lang->shorttitle)?> * </label>
                                                    </a>
                                                </li>
                                            <?php }?>
                                        </ul>

                                        <!-- tabs content -->
                                        <div class="tab-content ">
                                            <?php foreach ($langs as $key => $lang){?>
                                                <div id="tab<?php echo $key+1?>_desc" class="tab-pane <?php echo $key==0?'active':''?>">
                                                    <div class="row">
                                                        <div class="form-group">
                                                            <div class="col-md-12 col-sm-12">
                                                                <input type="text" name="desc_<?php echo $lang->shorttitle?>" value="<?php echo @$item->{"desc_".$lang->shorttitle}?>" class="form-control required">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            <?php }?>
                                        </div>
                                    </div>

                                    <hr>

                                    <div class="row">
                                        <div class="form-group">
                                            <div class="col-md-12 col-sm-12">
                                                <label>Icon </label>
                                                <input type="text" name="icon" value="<?php echo @$item->icon?>" class="form-control required">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="form-group">
                                            <div class=" col-md-12 col-sm-12" align="right">
                                                <label class="switch switch switch-round">
                                                    <span> Active to public on the web?</span>

                                                    <input name="is_active" type="checkbox" <?php echo @$item->is_active=='Y'?'checked=""':''?> >
                                                    <span class="switch-label" data-on="Yes" data-off="No"></span>
                                                </label>
                                            </div>

                                        </div>
                                    </div>

                                </div>
                            </div>

                        </fieldset>

                        <div class="row">
                            <div class="col-md-12">
                                <button id="savebtn" type="submit" form="infobarform" value="Submit" class="progress-button btn btn-3d btn-teal btn-xlg btn-block margin-top-30" >
                                    SAVE
                                </button>
                            </div>
                        </div>

                    </form>

                </div>

            </div>
        </div>

    </div>
</section>