<style>
    table.template td, table.template th{
        padding:0px 5px; 
    }
</style>

<?php $Template = get_template() ?>
<div class="container-fluid" style="padding-bottom: 30px;">
    <div class="row">
        <table class="table table-bg-color-white template">
            <caption style="text-align:center; color: #000;"><h1><span style="cursor: pointer"onclick="window.history.back()">(Go Back)</span>&nbsp;Template manager&nbsp; (<a href="<?php echo site_url() ?>" target="_blank" style="color:#000">Preview</a>)</h1></caption>
            <tr>
                <th style="vertical-align: middle;">Menu</th>
                <td>
                    <form id="menuWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="menu">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->btncolor ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['menu']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['menu']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('menuWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#menu" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Home</th>
                <td>
                    <form id="homeWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="home">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['home']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['home']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['home']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['home']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['home']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['home']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['home']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['home']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('homeWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#home" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">About</th>
                <td>
                    <form id="aboutWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="about">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['about']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['about']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['about']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['about']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['about']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['about']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['about']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['about']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('aboutWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#about" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Contact</th>
                <td>
                    <form id="contactWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="contact">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['contact']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['contact']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('contactWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#contact" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'contact' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Gallery</th>
                <td>
                    <form id="galleryWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="gallery">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['gallery']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['gallery']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('galleryWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#gallery" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'gallery' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Reservation</th>
                <td>
                    <form id="reservationWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="reservation">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['reservation']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['reservation']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('reservationWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#reservation" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'contact/reservation' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Review</th>
                <td>
                    <form id="reviewWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="review">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['review']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['review']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['review']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['review']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['review']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['review']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['review']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['review']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('reviewWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#review" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'review' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Online Order</th>
                <td>
                    <form id="onlineorderWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="onlineorder">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['onlineorder']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['onlineorder']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('onlineorderWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#food-menu" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'onlineorder' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Popups</th>
                <td>
                    <form id="popupsWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="popups">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['popups']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['popups']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('popupsWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#food-menu" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'onlineorder' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
            <tr>
                <th style="vertical-align: middle;">Footer</th>
                <td>
                    <form id="footerWrapper">
                        <table>
                            <tr>
                                <td>
                                    <p>Background</p>
                                    <input type="hidden" name="wrapper" value="footer">
                                    <input type="text" name="wrapperbg" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->wrapperbg ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="wrapperbg_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->wrapperbg_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Content Text</p>
                                    <input type="text" name="content" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->content ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="content_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->content_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Title Text</p>
                                    <input type="text" name="section_title" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->section_title ?>" >
                                    <p>Opacity</p>
                                    <input type="number" name="section_title_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->section_title_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Bg</p>
                                    <input type="text" name="btn" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->btn ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btn_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->btn_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button Text</p>
                                    <input type="text" name="btncolor" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->btncolor ?>" >
                                    <p>opacity</p>
                                    <input type="number" name="btncolor_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->btncolor_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Button H/A</p>
                                    <input type="text" name="hover" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->hover ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="hover_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->hover_opacity ?>" class="form-control input-sm">
                                </td>
                                <td>
                                    <p>Border</p>
                                    <input type="text" name="border" class="jscolor form-control input-sm" value="<?php echo $Template['footer']->border ?>">
                                    <p>Opacity</p>
                                    <input type="number" name="border_opacity" step="0.1" min="0" max="1" value="<?php echo $Template['footer']->border_opacity ?>" class="form-control input-sm">
                                </td>
                                <td style="vertical-align: middle; text-align: center;">
                                    <a href="javascript:void(0)" class="btn btn-default sharp" style="width:110px; margin: 10px;" onclick="saveTemplate('footerWrapper')">Update</a><br/>
                                    <?php if ($this->config->item('website_style') == 'singlepage'): ?>
                                        <a href="<?php echo base_url() ?>#food-menu" target="_blank" class="btn btn-default sharp" style="color: #000000">Preview</a>
                                    <?php else: ?>
                                        <a href="<?php echo base_url() . 'onlineorder' ?>" target="_blank" class="btn btn-default sharp">Preview</a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>	
                    </form>
                </td>
            </tr>
        </table>
    </div>
</div>

<script type="text/javascript">
    function saveTemplate(Form) {
        var myform = document.getElementById(Form);
        var formdata = new FormData(myform);
        $.ajax({
            url: '<?php echo site_url('gkpos/online/save_tamplate') ?>',
            data: formdata,
            cache: false,
            processData: false,
            contentType: false,
            type: 'POST',
            dataType: 'json',
            success: function (output) {
                if (output.success) {
                    window.location.reload();
                } else {
                    alert(output.message);
                }
            }
        });
    }
</script>