ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Areas/Admin/Views/Setting/Catalog.TabSharing.cshtml
@model CatalogSettingsModel

<script>
        $(document).ready(function () {

            $("#@Html.FieldIdFor(model => model.ShowShareButton)").click(togglePageShareCode);

            togglePageShareCode();
        });

        function togglePageShareCode() {
            if ($('#@Html.FieldIdFor(model => model.ShowShareButton)').is(':checked')) {
                $('#pnlPageShareCode').show();
            }
            else {
                $('#pnlPageShareCode').hide();
            }
        }
</script>
<div class="form-horizontal">
    <div class="form-body">
        <div class="form-group">
            <div class="col-8 col-md-4 col-sm-4 text-right">
                @Html.OverrideStoreCheckboxFor(model => model.ShowShareButton_OverrideForStore, model => model.ShowShareButton, Model.ActiveStoreScopeConfiguration)
                <admin-label asp-for="ShowShareButton" class="control-label" />
            </div>
            <div class="col-4 col-md-8 col-sm-8">
                <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                    <admin-input asp-for="ShowShareButton" />
                     <div class="control__indicator"></div>
                </label>
                <span asp-validation-for="ShowShareButton"></span>
            </div>
        </div>
        <div class="form-group" id="pnlPageShareCode">
            <div class="col-8 col-md-4 col-sm-4 text-right">
                @Html.OverrideStoreCheckboxFor(model => model.PageShareCode_OverrideForStore, model => model.PageShareCode, Model.ActiveStoreScopeConfiguration)
                <admin-label asp-for="PageShareCode" class="control-label" />
            </div>
            <div class="col-4 col-md-8 col-sm-8">
                <admin-textarea asp-for="PageShareCode"></admin-textarea>
                <span asp-validation-for="PageShareCode"></span>
            </div>
        </div>
    </div>
</div>