Skip to content

Commit

Permalink
Admin panel - Add missing settings Show captcha on vendor review page
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofPajak committed Nov 2, 2021
1 parent 7b33ff9 commit fa3266e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
$('#ssCaptchaShowOnApplyVendorPagepnl').show();
$('#ssReCaptchaPrivateKeypnl').show();
$('#ssReCaptchaVersionpnl').show();
$('#ssCaptchaShowOnVendorReviewPagepnl').show();
}
else {
$('#ssCaptchaShowOnLoginPagepnl').hide();
Expand All @@ -40,6 +41,7 @@
$('#ssCaptchaShowOnApplyVendorPagepnl').hide();
$('#ssReCaptchaPrivateKeypnl').hide();
$('#ssReCaptchaVersionpnl').hide();
$('#ssCaptchaShowOnVendorReviewPagepnl').hide();
}
}
</script>
Expand Down Expand Up @@ -220,6 +222,18 @@
<span asp-validation-for="SecuritySettings.CaptchaShowOnApplyVendorPage"></span>
</div>
</div>
<div class="form-group" id="ssCaptchaShowOnVendorReviewPagepnl">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="SecuritySettings.CaptchaShowOnVendorReviewPage" 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="SecuritySettings.CaptchaShowOnVendorReviewPage" />
<div class="control__indicator"></div>
</label>
<span asp-validation-for="SecuritySettings.CaptchaShowOnVendorReviewPage"></span>
</div>
</div>
<div class="form-group" id="ssReCaptchaVersionpnl">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="SecuritySettings.ReCaptchaVersion" class="control-label" />
Expand Down
2 changes: 2 additions & 0 deletions src/Web/Grand.Web.Admin/Mapper/CaptchaSettingsProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public CaptchaSettingsProfile()
.ForMember(dest => dest.CaptchaShowOnNewsCommentPage, mo => mo.MapFrom(p => p.ShowOnNewsCommentPage))
.ForMember(dest => dest.CaptchaShowOnProductReviewPage, mo => mo.MapFrom(p => p.ShowOnProductReviewPage))
.ForMember(dest => dest.CaptchaShowOnApplyVendorPage, mo => mo.MapFrom(p => p.ShowOnApplyVendorPage))
.ForMember(dest => dest.CaptchaShowOnVendorReviewPage, mo => mo.MapFrom(p => p.ShowOnVendorReviewPage))
.ForMember(dest => dest.ReCaptchaVersion, mo => mo.MapFrom(p => p.ReCaptchaVersion))
.ForMember(dest => dest.ReCaptchaPublicKey, mo => mo.MapFrom(p => p.ReCaptchaPublicKey))
.ForMember(dest => dest.ReCaptchaPrivateKey, mo => mo.MapFrom(p => p.ReCaptchaPrivateKey))
Expand All @@ -43,6 +44,7 @@ public CaptchaSettingsProfile()
.ForMember(dest => dest.ShowOnNewsCommentPage, mo => mo.MapFrom(p => p.CaptchaShowOnNewsCommentPage))
.ForMember(dest => dest.ShowOnProductReviewPage, mo => mo.MapFrom(p => p.CaptchaShowOnProductReviewPage))
.ForMember(dest => dest.ShowOnApplyVendorPage, mo => mo.MapFrom(p => p.CaptchaShowOnApplyVendorPage))
.ForMember(dest => dest.ShowOnVendorReviewPage, mo => mo.MapFrom(p => p.CaptchaShowOnVendorReviewPage))
.ForMember(dest => dest.ReCaptchaVersion, mo => mo.MapFrom(p => p.ReCaptchaVersion))
.ForMember(dest => dest.ReCaptchaPublicKey, mo => mo.MapFrom(p => p.ReCaptchaPublicKey))
.ForMember(dest => dest.ReCaptchaPrivateKey, mo => mo.MapFrom(p => p.ReCaptchaPrivateKey));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ public SecuritySettingsModel()
[GrandResourceDisplayName("Admin.Settings.GeneralCommon.CaptchaShowOnApplyVendorPage")]
public bool CaptchaShowOnApplyVendorPage { get; set; }

[GrandResourceDisplayName("Admin.Settings.GeneralCommon.CaptchaShowOnVendorReviewPage")]
public bool CaptchaShowOnVendorReviewPage { get; set; }

[GrandResourceDisplayName("Admin.Settings.GeneralCommon.reCaptchaPublicKey")]

Expand Down
3 changes: 3 additions & 0 deletions src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11203,6 +11203,9 @@
<Resource Name="Admin.Settings.GeneralCommon.CaptchaShowOnRegistrationPage">
<Value>Show on registration page</Value>
</Resource>
<Resource Name="Admin.Settings.GeneralCommon.CaptchaShowOnVendorReviewPage">
<Value>Show on vendor reviews page</Value>
</Resource>
<Resource Name="Admin.Settings.GeneralCommon.ConvertNonWesternChars">
<Value>Convert non-western chars</Value>
</Resource>
Expand Down

0 comments on commit fa3266e

Please sign in to comment.