51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
|
|
@model atakanozbancom.Models.classes.AdminSocialIconVM
|
||
|
|
@{
|
||
|
|
ViewBag.Title = "socialiconget";
|
||
|
|
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||
|
|
}
|
||
|
|
|
||
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
|
||
|
|
|
||
|
|
<h2 class="mt-3 text-white">Edit Social Icon</h2>
|
||
|
|
@if (TempData["ok"] != null)
|
||
|
|
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||
|
|
<hr />
|
||
|
|
|
||
|
|
@using (Html.BeginForm("socialiconget", "admin", FormMethod.Post))
|
||
|
|
{
|
||
|
|
@Html.AntiForgeryToken()
|
||
|
|
@Html.HiddenFor(m => m.id)
|
||
|
|
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
|
||
|
|
|
||
|
|
<div class="mb-3">
|
||
|
|
@Html.LabelFor(p => p.icon, new { @class = "text-white" })
|
||
|
|
<div class="input-group">
|
||
|
|
<span class="input-group-text bg-dark text-white fs-4" style="width:3rem;justify-content:center;">
|
||
|
|
<i id="icon-preview" class="@Model.icon"></i>
|
||
|
|
</span>
|
||
|
|
@Html.TextBoxFor(p => p.icon, new { @class = "form-control bg-dark text-white", id = "icon-input" })
|
||
|
|
</div>
|
||
|
|
<small class="text-muted">
|
||
|
|
Any <a href="https://fontawesome.com/search?ic=brands" target="_blank" rel="noopener" class="text-info">Font Awesome</a> class name, e.g. <code>fa-brands fa-youtube</code> or <code>fa-solid fa-link</code>.
|
||
|
|
</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.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>
|
||
|
|
document.getElementById('icon-input').addEventListener('input', function () {
|
||
|
|
document.getElementById('icon-preview').className = this.value;
|
||
|
|
});
|
||
|
|
</script>
|