-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17455 from abpframework/issue-17321
CMS Kit: Add reCaptcha to comment edit section if it's enabled
- Loading branch information
Showing
8 changed files
with
94 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Volo.Abp.AspNetCore.Mvc; | ||
using Volo.CmsKit.Localization; | ||
|
||
namespace Volo.CmsKit.Public.Web.Controllers; | ||
|
||
public abstract class CmsKitPublicControllerBase : AbpController | ||
{ | ||
public CmsKitPublicControllerBase() | ||
{ | ||
LocalizationResource = typeof(CmsKitResource); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
</div> | ||
</div> | ||
<div class="mt-0"> | ||
<small class="text-muted float-start float-end">@L["MarkdownSupported"]</small> | ||
<small class="text-muted float-end">@L["MarkdownSupported"]</small> | ||
</div> | ||
|
||
@if (CmsKitCommentOptions.Value.IsRecaptchaEnabled) | ||
|
@@ -127,15 +127,32 @@ | |
<input name="commentConcurrencyStamp" value="@concurrencyStamp" type="hidden" /> | ||
</div> | ||
</div> | ||
<div class="mt-0"> | ||
<small class="text-muted float-end" >@L["MarkdownSupported"]</small> | ||
</div> | ||
|
||
@if (CmsKitCommentOptions.Value.IsRecaptchaEnabled) | ||
{ | ||
var output = Model.GetCaptcha(); | ||
<div class="volo-captcha"> | ||
<label class="form-label" for="[email protected]">@L["CaptchaCode"]</label> | ||
<div class="d-flex"> | ||
<div class="bd-highlight"> | ||
<img src="@Model.GetCaptchaImageBase64(output.ImageBytes)"/> | ||
</div> | ||
<div class="flex-grow-1 bd-highlight"> | ||
<abp-input id="[email protected]" type="number" asp-for="@Model.Input.Captcha" suppress-label="true" class="d-inline-block" autocomplete="off"/> | ||
</div> | ||
<abp-input asp-for="@Model.CaptchaId" value="@output.Id"/> | ||
</div> | ||
</div> | ||
} | ||
<div class="col-auto"> | ||
<div class="text-end"> | ||
<abp-button type="submit" button-type="Primary" size="Block"> @L["Update"] </abp-button> | ||
<abp-button type="button" button-type="Light" size="Block_Small" class="comment-edit-cancel-button" data-id="@id.ToString()"><i class="fa fa-times me-1"></i> @L["Cancel"] </abp-button> | ||
</div> | ||
</div> | ||
<div class="mt-0"> | ||
<small class="text-muted float-start" >@L["MarkdownSupported"]</small> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters