Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product spec attribute custom html #223

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@{
Layout = "";
}
<form id="ProductSpecificationPopup" asp-area="@Constants.AreaAdmin"
asp-controller="Product" asp-action="ProductSpecAttrPopup"
<form id="ProductSpecificationPopup" asp-area="@Constants.AreaAdmin"
asp-controller="Product" asp-action="ProductSpecAttrPopup"
enctype="multipart/form-data" method="post"
asp-route-ProductId="@Context.Request.Query["ProductId"]"
asp-route-Id="@Context.Request.Query["Id"]">
Expand Down Expand Up @@ -61,7 +61,11 @@
</div>
<div class="form-group" id="pnlCustomValue">
<admin-label asp-for="CustomValue" />
<div class="col-md-9 col-sm-9">
<div class="col-md-9 col-sm-9" id="pnlCustomHTMLText">
<admin-input asp-for="CustomValue" asp-template="Editor" />
<span asp-validation-for="CustomValue"></span>
</div>
<div class="col-md-9 col-sm-9" id="pnlCustomValueText">
<admin-input asp-for="CustomValue" />
<span asp-validation-for="CustomValue"></span>
</div>
Expand Down Expand Up @@ -174,23 +178,31 @@
$('#pnlCustomValue').hide();
$('#pnlCustomName').hide();
$('#disableOnCustom').show();
$('#pnlCustomValueText').hide();
$('#pnlCustomHTMLText').hide();
$('#pnlAllowFiltering').show();
} else if (selectedTypeId == @(((int)SpecificationAttributeType.CustomText).ToString())) {
$('#pnlSpecificationAttributeOptionId').hide();
$('#pnlCustomName').show();
$('#pnlCustomValue').show();
$('#pnlCustomValueText').show();
$('#pnlCustomHTMLText').hide();
$('#disableOnCustom').hide();
$('#pnlAllowFiltering').hide();
} else if (selectedTypeId == @(((int)SpecificationAttributeType.CustomHtmlText).ToString())) {
$('#pnlSpecificationAttributeOptionId').hide();
$('#pnlCustomName').show();
$('#pnlCustomValue').show();
$('#pnlCustomValueText').hide();
$('#pnlCustomHTMLText').show();
$('#disableOnCustom').hide();
$('#pnlAllowFiltering').hide();
} else if (selectedTypeId == @(((int)SpecificationAttributeType.Hyperlink).ToString())) {
$('#pnlSpecificationAttributeOptionId').hide();
$('#pnlCustomName').show();
$('#pnlCustomValue').show();
$('#pnlCustomValueText').hide();
$('#pnlCustomHTMLText').hide();
$('#disableOnCustom').hide();
$('#pnlAllowFiltering').hide();
}
Expand Down