@using MrCMS.Helpers
@model MrCMS.Web.Apps.Ecommerce.Entities.NewsletterBuilder.NewsletterTemplate
@{
    ViewBag.Title = "Edit Newsletter Template";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@using (Html.BeginForm("Edit", "NewsletterTemplate", FormMethod.Post))
{
    <fieldset>
        <legend>Edit Newsletter Template
            <span class="btn-group display-inline pull-right">
                @Html.ActionLink("Return to List", "Index", "NewsletterTemplate", null, new { @class = "btn btn-default" })
                <a href="@Url.Action("Delete", "NewsletterTemplate", new { id = Model.Id })" class="btn btn-danger" data-toggle="fb-modal">Delete</a>
                <input type="submit" class="btn btn-primary" value="Save"/>
            </span>
        </legend>

        <div class="row">
            <div class="col-lg-12">
                <div class="form-group">
                    @Html.LabelFor(x => x.Name)
                    @Html.TextBoxFor(x => x.Name, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.Name)
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.BaseTemplate)
                    @Html.TextAreaFor(x => x.BaseTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.BaseTemplate)
                </div>

                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [BodyContent]
                </div>

                <div class="form-group">
                    @Html.LabelFor(x => x.Divider)
                    @Html.TextAreaFor(x => x.Divider, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.Divider)
                </div>
                <h4>Content Items Templates</h4>

                <div class="form-group">
                    @Html.LabelFor(x => x.FreeTextTemplate)
                    @Html.TextAreaFor(x => x.FreeTextTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.FreeTextTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [Text]
                </div>
                <br />
                <div class="form-group">
                    @Html.LabelFor(x => x.ImageRightAndTextLeftTemplate)
                    @Html.TextAreaFor(x => x.ImageRightAndTextLeftTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.ImageRightAndTextLeftTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [ImageUrl], [Text]
                </div>
                
                <div class="form-group">
                    @Html.LabelFor(x => x.ImageLeftAndTextRightTemplate)
                    @Html.TextAreaFor(x => x.ImageLeftAndTextRightTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.ImageLeftAndTextRightTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [ImageUrl], [Text]
                </div>

                <br />
                <div class="form-group">
                    @Html.LabelFor(x => x.ProductGridTemplate)
                    @Html.TextAreaFor(x => x.ProductGridTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.ProductGridTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [Productrow]
                </div>

                <br />
                <div class="form-group">
                    @Html.LabelFor(x => x.ProductRowTemplate)
                    @Html.TextAreaFor(x => x.ProductRowTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.ProductRowTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [Product]
                </div>
                <br />
                <div class="form-group">
                    @Html.LabelFor(x => x.ProductTemplate)
                    @Html.TextAreaFor(x => x.ProductTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.ProductTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [ProductImage], [ProductName], [ProductUrl], [ProductPrice], [ProductOldPrice]
                </div>
                <br />
                <div class="form-group">
                    @Html.LabelFor(x => x.BannerTemplate)
                    @Html.TextAreaFor(x => x.BannerTemplate, new { @class = "form-control", rows = 6 })
                    @Html.ValidationMessageFor(x => x.BannerTemplate)
                </div>
                <div class="alert alert-info">
                    <strong>Available Tokens: </strong> [ImageUrl], [LinkUrl]
                </div>
            </div>
        </div>
    </fieldset>
}

@{
    Html.IncludeScript("~/Apps/Ecommerce/Areas/Admin/Content/Scripts/custom/newsletter-ck.js");
}