Files
atakanozbancom/Views/admin/affiliatelinkget.cshtml

62 lines
2.6 KiB
Plaintext

@model atakanozbancom.Models.classes.AdminAffiliateLinkVM
@{
ViewBag.Title = "affiliatelinkget";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="mt-3 text-white">Edit Affiliate Link</h2>
@if (TempData["ok"] != null)
{<div class="alert alert-success">@TempData["ok"]</div>}
<hr />
@using (Html.BeginForm("affiliatelinkget", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(m => m.id)
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
<div class="mb-3">
<label class="text-white">Current Logo</label><br />
<img id="logoPreview" src="@Model.existingImage" alt="@Model.TitleEN" style="@(string.IsNullOrWhiteSpace(Model.existingImage) ? "display:none;" : "")width:64px;height:64px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" />
<input id="logoFile" type="file" name="logoFile" class="form-control bg-dark text-white mt-2" accept="image/*" />
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#logoFile', '#logoPreview')">
<i class="fa-solid fa-paste me-1"></i>Paste image
</button>
<small class="text-muted d-block mt-1">Leave empty to keep the current logo.</small>
</div>
<div class="mb-3">
@Html.LabelFor(p => p.url, new { @class = "text-white" })
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white", rows = 2 })
</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" })
</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", rows = 2 })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
</div>
<button class="btn btn-success">Save</button>
}