@model atakanozbancom.Models.classes.AdminMyProjectsEditVM

@{
    ViewBag.Title = "myprojectsget";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<h2 class="mt-3 text-white">My Projects Edit Post</h2>

@if (TempData["ok"] != null)
{
    <div class="alert alert-success">@TempData["ok"]</div>
}

<hr />

@using (Html.BeginForm("myprojectsget", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(m => m.id)

    <div class="mb-3">
        @Html.LabelFor(m => m.id, new { @class = "text-white" })
        @Html.TextBoxFor(m => m.id, new { @class = "form-control bg-dark text-white", @readonly = "readonly" })
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.TitleEN, new { @class = "text-white" })
        @Html.TextBoxFor(m => m.TitleEN, new { @class = "form-control bg-dark text-white required" })
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.DescEN, new { @class = "text-white" })
        @Html.TextAreaFor(m => m.DescEN, new { @class = "form-control bg-dark text-white required", rows = "6" })
    </div>

    if (!string.IsNullOrEmpty(Model.image))
    {
        <div class="mb-3">
            <label class="text-white">Current Image</label>
            <br />
            <img src="@Model.image" style="max-width:200px;" class="mb-2" />
        </div>
    }

    <div class="mb-3">
        <label class="text-white">Change Image</label>
        <input type="file" name="file" class="form-control bg-dark text-white" />
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.iframe, new { @class = "text-white" })
        @Html.TextBoxFor(m => m.iframe, new { @class = "form-control bg-dark text-white" })
    </div>

    <h3 class="mt-3 text-white">Translation (TR)</h3>

    <div class="mb-3">
        @Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
        @Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white required" })
    </div>

    <div class="mb-3">
        @Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
        @Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white required", rows = "6" })
    </div>

    <button class="btn btn-success">Save</button>
}