0ccbef45a1
Co-authored-by: Cursor <cursoragent@cursor.com>
63 lines
2.5 KiB
Plaintext
63 lines
2.5 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/*" />
|
|
<small class="text-muted">Leave empty to keep the current logo. You can also paste (Ctrl+V) an image directly.</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>
|
|
}
|
|
|
|
<script>
|
|
enablePasteUpload('#logoFile', '#logoPreview');
|
|
</script>
|