setting fixes

pull/83/head
Aevann 2023-01-01 11:42:23 +02:00
parent 3bf072079c
commit e30d3649f1
6 changed files with 12 additions and 12 deletions

View File

@ -390,7 +390,7 @@ def get_css(id):
try: id = int(id)
except: abort(404)
css, bg = g.db.query(User.profilecss, User.profile_background).filter_by(id=id).one_or_none()
css, bg = g.db.query(User.profilecss, User.background).filter_by(id=id).one_or_none()
if bg:
if not css: css = ''

View File

@ -264,7 +264,7 @@
<form id="searchform" class="form-inline search flex-nowrap mx-0 mx-lg-auto" action="/search/posts" method="get">
<input autocomplete="off" class="form-control form-control-sm w-100" type="search" placeholder="{{search_placeholder}}" name="q">
<span class="input-group-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem" onclick_submit>
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem" data-nonce="{{g.nonce}}" onclick_submit>
<i class="fa fa-search"></i>
</span>
</span>

View File

@ -25,7 +25,7 @@
<form action="{{form_action}}" id="{{id}}-form" method="post" class="color-picker" style="line-height: 0">
<input type="hidden" name="formkey" value="{{v|formkey}}">
{% for themecolor in COLORS %}
<input autocomplete="off" type="radio" name="{{form_name}}" id="{{id}}-{{themecolor}}" value="{{themecolor}}" {% if current_color == themecolor %}checked{% endif %} onclick_submit>
<input autocomplete="off" type="radio" name="{{form_name}}" id="{{id}}-{{themecolor}}" value="{{themecolor}}" {% if current_color == themecolor %}checked{% endif %} data-nonce="{{g.nonce}}" onclick_submit>
<label class="color-radio" for="{{id}}-{{themecolor}}">
<span style="background-color: #{{themecolor}}">
{% if current_color and current_color.lower() == themecolor %}

View File

@ -65,7 +65,7 @@
Upload custom site background
{% endif %}
</label>
<input autocomplete="off" id="upload-custom-background-file" accept="image/*", type="file" name="file" onchange_submit hidden>
<input autocomplete="off" id="upload-custom-background-file" accept="image/*", type="file" name="file" data-nonce="{{g.nonce}}" onchange_submit hidden>
</form>
{% if v.background %}
<div class="d-flex mb-3">
@ -124,7 +124,7 @@
<form action="/settings/images/profile" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="profile" onchange_submit>
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="profile" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
@ -146,7 +146,7 @@
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="banner" onchange_submit>
Update<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
@ -197,7 +197,7 @@
Use an MP3 file (Max size is 8MB)
{% endif %}
</div>
<input autocomplete="off" id="file-upload2" type="file" name="file" {% if g.is_tor %}disabled{% endif %} accept="audio/mp3" onchange_submit hidden>
<input autocomplete="off" id="file-upload2" type="file" name="file" {% if g.is_tor %}disabled{% endif %} accept="audio/mp3" data-nonce="{{g.nonce}}" onchange_submit hidden>
</label>
</form>
<form action="/settings/song_change" method="post">

View File

@ -28,7 +28,7 @@
<form action="/h/{{sub}}/marsey_image" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="marsey" onchange_submit>
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="marsey" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
@ -50,7 +50,7 @@
<form action="/h/{{sub}}/sidebar_image" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="sidebar" onchange_submit>
Update<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="sidebar" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
@ -86,7 +86,7 @@
<form action="/h/{{sub.name}}/settings/banners/" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload New Banner<input autocomplete="off" type="file" accept="image/*" hidden name="banner" onchange_submit>
Upload New Banner<input autocomplete="off" type="file" accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
<button type="button" class="btn btn-danger sub-banner-delete-button" id="sub-banner-delete-all" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{sub.name}}/settings/banners/', 'DELETE');">Delete All Banners</button>
</form>

View File

@ -198,7 +198,7 @@
Upload Profile Background
{% endif %}
</label>
<input autocomplete="off" id="upload-profile-background-file" accept="image/*", type="file" name="file" onchange_submit hidden>
<input autocomplete="off" id="upload-profile-background-file" accept="image/*", type="file" name="file" data-nonce="{{g.nonce}}" onchange_submit hidden>
</form>
{% if v.profile_background -%}
@ -417,7 +417,7 @@
Upload Profile Background
{% endif %}
</label>
<input autocomplete="off" id="upload-profile-background-file-mobile" accept="image/*", type="file" name="file" onchange_submit hidden>
<input autocomplete="off" id="upload-profile-background-file-mobile" accept="image/*", type="file" name="file" data-nonce="{{g.nonce}}" onchange_submit hidden>
</form>
{% if v.profile_background -%}