Skip to content

Commit

Permalink
Fix for cmdCancel issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
juvander committed Feb 15, 2016
1 parent c36d677 commit 0257010
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion branches/DNN_5/Forum_PostReport.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
<ul class="dnnActions dnnClear">
<li><asp:linkbutton cssclass="dnnPrimaryAction" id="cmdReport" runat="server" resourcekey="cmdReport" /></li>
<li><asp:HyperLink cssclass="dnnSecondaryAction" id="cmdCancel" runat="server" resourcekey="cmdCancel" /></li>
<li><asp:linkbutton cssclass="dnnSecondaryAction" id="cmdCancel" runat="server" resourcekey="cmdCancel" /></li>
</ul>
</fieldset>
</div>
2 changes: 1 addition & 1 deletion branches/DNN_5/Forum_PostReport.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions branches/DNN_5/Forum_PostReport.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ Namespace DotNetNuke.Modules.Forum
ForumUtils.LoadCssFile(DefaultPage, objConfig)

If Page.IsPostBack = False Then
If Not Request.UrlReferrer Is Nothing Then
cmdCancel.NavigateUrl = Request.UrlReferrer.ToString()
Else
cmdCancel.NavigateUrl = NavigateURL()
End If

PopulatePost(_PostInfo)
PopulateTemplateDDL()

Expand All @@ -139,6 +133,14 @@ Namespace DotNetNuke.Modules.Forum
End Try
End Sub

Protected Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
If Not ViewState("UrlReferrer") Is Nothing Then
Response.Redirect(CType(ViewState("UrlReferrer"), String), False)
Else
Response.Redirect(NavigateURL())
End If
End Sub

''' <summary>
''' Reports a post as abusive
''' </summary>
Expand Down

0 comments on commit 0257010

Please sign in to comment.