mirror of
https://github.com/neocities/neocities.git
synced 2025-04-28 11:12:30 +02:00
site profile: no csrf/flash unless signed in
This commit is contained in:
parent
380bd5f484
commit
369f1655a9
2 changed files with 69 additions and 65 deletions
|
@ -19,7 +19,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="modal hide" id="addTag" tabindex="-1" role="dialog" aria-labelledby="addTagLabel" aria-hidden="true">
|
||||
<% if current_site && current_site == site %>
|
||||
<div class="modal hide" id="addTag" tabindex="-1" role="dialog" aria-labelledby="addTagLabel" aria-hidden="true">
|
||||
<form method="POST" action="/tags/add">
|
||||
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
|
||||
<div class="modal-header">
|
||||
|
@ -37,9 +38,9 @@
|
|||
<button type="submit" class="btn-Action">Add Tag</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal hide" id="removeTag" tabindex="-1" role="dialog" aria-labelledby="removeTagLabel" aria-hidden="true">
|
||||
<div class="modal hide" id="removeTag" tabindex="-1" role="dialog" aria-labelledby="removeTagLabel" aria-hidden="true">
|
||||
<form method="POST" action="/tags/remove">
|
||||
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
|
||||
<div class="modal-header">
|
||||
|
@ -60,4 +61,5 @@
|
|||
<button type="submit" class="btn-Action">Remove Tag(s)</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,5 +1,5 @@
|
|||
<div class="header-Outro with-site-image">
|
||||
<% if flash.keys.length > 0 %>
|
||||
<% if current_site && flash.keys.length > 0 %>
|
||||
<div class="row content">
|
||||
<div class="alert txt-Center">
|
||||
<% flash.keys.each do |key| %>
|
||||
|
@ -90,7 +90,8 @@
|
|||
</div></div>
|
||||
</div>
|
||||
|
||||
<div class="modal hide" id="block" tabindex="-1" role="dialog" aria-labelledby="blockLabel" aria-hidden="true">
|
||||
<% if current_site %>
|
||||
<div class="modal hide" id="block" tabindex="-1" role="dialog" aria-labelledby="blockLabel" aria-hidden="true">
|
||||
<form method="POST" action="/site/<%= site.username %>/block">
|
||||
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
|
||||
<div class="modal-header">
|
||||
|
@ -114,4 +115,5 @@
|
|||
<button type="submit" class="btn-Action">Block Site</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
Loading…
Add table
Reference in a new issue