{extends file="admin-layout.tpl"}

{block name="check-resource"}admin.coupon{/block}
{block name="check-access"}create{/block}

{block name="page-title"}{intl l='Create coupon'}{/block}

{block name="main-content"}
<section id="wrapper" class="container">

    <nav>
        <ul class="breadcrumb">
            <li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
            <li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
            <li>{intl l='Create'}</li>
        </ul>
    </nav>

    <div class="page-header">
        <h1>{intl l='Coupons : '}<small>{intl l='Create a new coupon'}</small></h1>
    </div>

    {form name="thelia.admin.coupon.creation"}
    {include file='coupon/form.html' formAction={url path={$formAction}} noConditions=true}
    {/form}
</section> <!-- #wrapper -->

{include file='includes/confirmation-modal.html'}
{/block}

{block name="javascript-initialization"}
    {javascripts file='assets/js/main.js'}
        <script src="{$asset_url}"></script>
    {/javascripts}

    {javascripts file='assets/js/json2.js'}
        <script src="{$asset_url}"></script>
    {/javascripts}

    {javascripts file='assets/js/coupon.js'}
        <script src="{$asset_url}"></script>
    {/javascripts}

    <script src="{url file='/tinymce/tinymce.min.js'}"></script>
    <script>
        tinymce.init({
            selector: ".wysiwyg",
            theme: "modern",
            menubar : false,
            language: "",
            plugins: [
                "advlist autolink link image lists charmap print preview hr anchor pagebreak",
                "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
                "table contextmenu directionality emoticons paste textcolor filemanager"
            ],
            toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor  | print preview code ",
            image_advtab: true ,
            external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
            filemanager_title:"{intl l='Files manager'}" ,
            external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
        });
    </script>

{/block}
