forked from MarseyWorld/MarseyWorld
give a window alert instead of greying-out to prevent confusion
parent
adc545769b
commit
17433202d1
|
@ -767,3 +767,10 @@ function delReport(t, url) {
|
|||
for (const el of document.getElementsByClassName('autofocus')) {
|
||||
el.focus()
|
||||
}
|
||||
|
||||
for (const el of document.getElementsByClassName('tor-disabled')) {
|
||||
el.onclick = (e) => {
|
||||
e.preventDefault();
|
||||
window.alert("File uploads are not allowed through TOR!")
|
||||
};
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro file_btn(input_id, disabled, image_only) %}
|
||||
<label class="btn btn-secondary format m-0" for="{{input_id}}" {% if g.is_tor or disabled %}disabled{% endif %}>
|
||||
<label class="btn btn-secondary format m-0 {% if g.is_tor %}tor-disabled{% endif %}" for="{{input_id}}" {% if disabled %}disabled{% endif %}>
|
||||
<span class="fas fa-{% if image_only %}image{% else %}file{% endif %}"></span>
|
||||
<input autocomplete="off" id="{{input_id}}" accept="image/*{% if not image_only %}, video/*, audio/*{% endif %}" type="file" multiple="multiple" name="file" {% if g.is_tor or disabled %}disabled{% endif %} hidden>
|
||||
</label>
|
||||
|
|
Loading…
Reference in New Issue