Added CSRF fields to mod/admin templates

This commit is contained in:
swaggboi 2024-08-15 20:24:31 -04:00
parent fd0eba29d7
commit e19ded1362
8 changed files with 10 additions and 2 deletions

View file

@ -18,5 +18,6 @@
<%= label_for password => 'Password' %>
<%= password_field password => (id => 'password') %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Reset</button>
</form>

View file

@ -26,5 +26,6 @@
<%= label_for password => 'Password' %>
<%= password_field password => (id => 'password') %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Create</button>
</form>

View file

@ -10,5 +10,6 @@
<%= label_for email => 'Email' %>
<%= email_field email => (id => 'email', autofocus => undef) %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Demote</button>
</form>

View file

@ -10,5 +10,6 @@
<%= label_for email => 'Email' %>
<%= email_field email => (id => 'email', autofocus => undef) %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Lock</button>
</form>

View file

@ -12,11 +12,12 @@
</div>
<div class="form-field">
<% if (my $error = validation->error('password')) { =%>
<p class="field-with-error">Must be between <%= $error->[2] %>
and <%= $error->[3] %> characters.</p>
<p class="field-with-error">Must be atleast <%= $error->[2] %>
characters.</p>
<% } =%>
<%= label_for password => 'Password' %>
<%= password_field password => (id => 'password') %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Login</button>
</form>

View file

@ -10,6 +10,7 @@
<%= label_for password => 'Password' %>
<%= password_field password => (id => 'password', autofocus => undef) %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Reset</button>
</form>

View file

@ -10,5 +10,6 @@
<%= label_for email => 'Email' %>
<%= email_field email => (id => 'email', autofocus => undef) %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Promote</button>
</form>

View file

@ -10,5 +10,6 @@
<%= label_for email => 'Email' %>
<%= email_field email => (id => 'email', autofocus => undef) %>
</div>
<%= csrf_field %>
<button type="submit" class="form-button">Unlock</button>
</form>