@{
    ViewData["Title"] = "Edit Template";
    Layout = "~/Views/Shared/_GuruLayout.cshtml";
}

@model EForT.Models.TemplateModel

@using (Html.BeginForm("EditTemplate", "Template", FormMethod.Post, Model))
{
    @Html.HiddenFor(m => m.Template.Id, new { id = "hdnId" })
    <div class="app-content container center-layout py-3">
        <div class="content-header row">
            <div class="content-header-left col-12 mb-2">
                <h1 class="content-header-title mb-0">Edit Template</h1>
                <div class="row breadcrumbs-top">
                    <div class="breadcrumb-wrapper col-12">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a href="@Url.Action("Guru", "Home")">Home</a>
                            </li>
                            <li class="breadcrumb-item">
                                Template
                            </li>
                            <li class="breadcrumb-item">
                                <a href="@Url.Action("ViewTemplates", "Templates")">View Templates</a>
                            </li>
                            <li class="breadcrumb-item active">
                                Edit Template
                            </li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <div class="content-wrapper">
            <div class="content-body">
                <div class="row">
                    <div class="col-12 col-xl-4 col-lg-4 col-md-12 col-sm-12 col-xs-12">
                        <div class="card">
                            <div class="card-header pb-0">
                                <div class="font-medium-2 bottom-border">
                                    <p>Template</p>
                                </div>
                            </div>
                            <div class="card-body pt-2">
                                <fieldset class="form-group">
                                    <label for="Name">Filename: <i class="warning">*</i></label>
                                    <input type="text" class="form-control" asp-for="Template.Filename" id="Name" required>
                                </fieldset>
                                <fieldset class="form-group">
                                    <label for="Enabled" class="position-relative">Enabled</label>
                                    <label class="switch">
                                        <input type="checkbox" asp-for="Template.Enabled" id="Enabled">
                                        <span class="slider round"></span>
                                    </label>
                                </fieldset>
                                <button type="submit" class="btn btn-primary my-1 mr-1">Save Changes</button>
                                <a href="@Url.Action("ViewTemplates", "Template")" class="btn btn-secondary my-1">Back</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
}