Skip to content

Commit

Permalink
fix: report post button shows up on guest page
Browse files Browse the repository at this point in the history
  • Loading branch information
CaramelKat committed Jul 29, 2024
1 parent 4c39b25 commit 875a435
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/webfiles/web/partials/post_template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</div>
<%}%>
</div>
<%if(locals.mainPost && !post.removed) {%>
<%if(locals.mainPost && !post.removed && pid !== 1000000000) {%>
<button id="header-communities-button" class="report" href="#" data-post="<%= post.id %>" onclick="reportPost(this)">Report Post</button>
<a id="report-launcher" style="display: none" data-module-hide="post" data-module-show="report-post-page" data-header="false" data-menu="false"></a>
<%}%>
Expand Down
3 changes: 2 additions & 1 deletion src/webfiles/web/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<% }); %>
</div>
</div>
<% if (pid !== 1000000000) { %>
<div id="report-post-page" class="add-post-page official-user-post" style="display: none">
<form method="post" action="/posts/<%=post.id%>/report" id="report-form" name="report" data-is-own-title="1" data-is-identified="1">
<input type="hidden" name="post_id" id="report-post-id" value="<%= post.id %>"/>
Expand Down Expand Up @@ -98,8 +99,8 @@
<input type="submit" class="post-button fixed-bottom-button" value="Submit">
</div>
</form>

</div>
<% } %>
</div>
</body>
</html>

0 comments on commit 875a435

Please sign in to comment.