<div id="panel_body" class="panel product-tab">

    <div id="js_no_conflict"></div>
    {$css_block}

    <script type="application/javascript">
        $(document).ready(function() {
            $.ajax({
                type: 'GET',
                headers: { "cache-control": "no-cache" },
                async: false,
                url: '{$ajax_route}?subject=html_generator&action=render_block&token={$token}',
                data: {
                    block_name: 'fixJQueryConflict'
                },
                success: function(data) {
                    data = $.parseJSON(data);

                    if (data.status == 'success') {
                        $('#js_no_conflict').html(data.message);
                    }
                }
            });
        });
    </script>

    <input id="token_item" type="hidden" name="token_item" value="{$token}"/>


    <h3>{l s="Core Design Settings" mod="myswissstyle"}</h3>
    <button id="module_swissstyle_init_builder_popup">{l s="Edit Design" mod="myswissstyle"}</button><br /><br />
    <h3>{l s="Edit Areas" mod="myswissstyle"}</h3>
    <div class="form-group">
        <div class="edit_preview_container">
        {foreach $product_details.views as $image}
            <div>
                <div class="edit_area_block" style="
                            background: url({$image.background}) scroll 0 0 / contain #fff no-repeat;
                            width:{$container.width};
                            height:{$container.height};
                        "
                        >
                    <div class="edit_area" view_id ="{$image.view_id}" style="
                            left:{$image.area_position.0}px;
                            top:{$image.area_position.1}px;
                            width: {$image.area_size.0}px;
                            height: {$image.area_size.1}px;
                    "></div>
                </div>

                <div class="form-wrapper sd-designer-status-container">
                    <div class="form-group">
                        <label class="control-label col-lg-3">
                            {l s="Enabled" mod="myswissstyle"}
                        </label>
                        <div class="col-lg-9 ">
                            <span class="switch prestashop-switch fixed-width-lg">
                                <input id="active_on_{$image.view_id}" class="form_item enable_status" type="radio" view_id ="{$image.view_id}"  {if $image.disable_status===1}checked="checked"{/if} value="1" name="active_design[{$image.view_id}]" />
                                <label for="active_on_{$image.view_id}">{l s="Yes"}</label>
                                <input id="active_off_{$image.view_id}" class="form_item enable_status" type="radio" view_id ="{$image.view_id}"  {if $image.disable_status===0}checked="checked"{/if} value="0" name="active_design[{$image.view_id}]" />
                                <label for="active_off_{$image.view_id}">{l s="No"}</label>
                                <a class="slide-button btn"></a>
                            </span>
                        </div>
                    </div>
                </div>

            </div>
            <br />
        {/foreach}
        </div>
    </div>
    {$js_block_bottom}

    <div class="panel-footer">
        <button id="design_areas_save" class="btn btn-default pull-right" type="submit">
            <i class="process-icon-save"></i>
            {l s="Save" mod="myswissstyle"}
        </button>
    </div>
</div>

<style>
    .sd-designer-status-container {
        position: relative;
        width: 450px;
    }
</style>


<div class="sw_popup_substrate"></div>
<div id="swissstyle_popup" class="sw_popup">
    <div class="body"></div>
    <div class="close_button"></div>
    <script type="application/javascript">
        var builder_product_id = "{$product_id}";
    </script>
</div>

{$css_block_bottom}