Skip to content

Commit

Permalink
#2091 Validation fix for password protected pages with forms
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshelev committed Feb 28, 2017
1 parent 4604c77 commit 0713a72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Presentation/Nop.Web/Views/Topic/TopicBlock.cshtml
Expand Up @@ -26,6 +26,8 @@
$('#ph-topic-@Model.Id .topic-block-body').html(data.Body);
$('#ph-password-@Model.Id').hide();
$('#ph-topic-@Model.Id').show();
//we need to re-run the validation plugin after the content is loaded after successful authentication
$.validator.unobtrusive.parse('#ph-topic-@Model.Id');
} else {
$('#password-error-@Model.Id').text(data.Error).fadeIn("slow");
$('#ph-password-@Model.Id #password-@Model.Id').select().focus();
Expand Down
2 changes: 2 additions & 0 deletions src/Presentation/Nop.Web/Views/Topic/TopicDetails.cshtml
Expand Up @@ -55,6 +55,8 @@
$('#ph-topic .page-body').html(data.Body);
$('#ph-password').hide();
$('#ph-topic').show();
//we need to re-run the validation plugin after the content is loaded after successful authentication
$.validator.unobtrusive.parse('#ph-topic');
}
else {
$('#password-error').text(data.Error).fadeIn("slow");
Expand Down

0 comments on commit 0713a72

Please sign in to comment.