@model Nop.Web.Models.PrivateMessages.PrivateMessageModel
@using Nop.Web;
@{    
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    Html.AddTitleParts(T("PageTitle.SendPM").Text);
}
@using (Html.BeginForm())
{
    <div class="privatemessagesend">
        <div class="title">
            @T("PrivateMessages.Send.PostMessage")
        </div>
        <div class="wrapper">
            <div class="error-block">
                <div class="message-error">
                    @Model.PostError
                </div>
            </div>
            @Html.ValidationSummary(false)
            @Html.HiddenFor(model => model.ToCustomerId)
            @Html.HiddenFor(model => model.ReplyToMessageId)
            <div class="clear">
            </div>
            <table class="postmessage">
                <tr>
                    <td class="fieldname">
                        @T("PrivateMessages.Send.To")
                    </td>
                    <td>
                        @Model.customerToName
                    </td>
                </tr>
                <tr>
                    <td class="fieldname">
                        @T("PrivateMessages.Send.Subject")
                    </td>
                    <td>
                        @Html.TextBoxFor(model => model.Subject, new { @class = "pmtitletext" })
                        @Html.ValidationMessageFor(model => model.Subject)
                    </td>
                </tr>
                <tr>
                    <td class="fieldname">
                        @T("PrivateMessages.Send.Message")
                    </td>
                    <td>
                        @Html.BBCodeEditor("Message")
                        @Html.TextAreaFor(model => model.Message, new { @class = "bbeditortext", TextMode = "MultiLine" })
                        @Html.ValidationMessageFor(model => model.Message)
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="options">
                        <input type="submit" value="@T("PrivateMessages.Send.SendButton")" class="submitpmbutton"/>
                        <input type="button" class="cancelpmbutton" value="@T("PrivateMessages.Send.CancelButton")" 
                        onclick="setLocation('@Url.Action("Index", "PrivateMessages")')" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
}