@model Yavsc.Server.Models.EMailing.MailingTemplate

@{
    ViewData["Title"] = "Edit";
}
@section scripts { 
    <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
}
<h2>Edit</h2>

<form asp-action="Edit">
    <div class="form-horizontal">
        <h4>MailingTemplate</h4>
        <hr />
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <div class="form-group">
            <label asp-for="Id" class="control-label col-md-2">Id</label>
            <div class="col-md-10">
                <select name="Id" asp-for="Id" asp-items="@ViewBag.Id" class="form-control" >
                </select>
                <span asp-validation-for="Id" class="text-danger" ></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="Body" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <code><pre class="prettyprint">@Model.Body</pre>
                <textarea  Id="Body" Name="Body" class="form-control" >@Model.Body</textarea>
                </code>
                <span asp-validation-for="Body" class="text-danger" ></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="ReplyToAddress" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <input asp-for="ReplyToAddress" class="form-control" />
                <span asp-validation-for="ReplyToAddress" class="text-danger" ></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="Topic" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <input asp-for="Topic" class="form-control" />
                <span asp-validation-for="Topic" class="text-danger" ></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="ToSend" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <select asp-for="ToSend" asp-items="@ViewBag.ToSend" class="form-control"></select>
                <span asp-validation-for="ToSend" class="text-danger" ></span>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
</form>

<div>
    <a asp-action="Index">Back to List</a>
</div>

