mirror of https://gitlab.crans.org/bde/nk20
Fix I'm the emitter button
This commit is contained in:
parent
48407cacf8
commit
89b2ff52e3
|
@ -65,9 +65,9 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
<input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
|
<input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
|
||||||
<div id="source_me_div">
|
<div id="source_me_div">
|
||||||
<hr>
|
<hr>
|
||||||
<span class="form-control mx-auto btn btn-secondary" id="source_me">
|
<a class="btn-block btn btn-secondary" href="#" id="source_me">
|
||||||
{% trans "I am the emitter" %}
|
{% trans "I am the emitter" %}
|
||||||
</span>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -78,7 +78,6 @@ class PermissionQueryTestCase(TestCase):
|
||||||
query = instanced.query
|
query = instanced.query
|
||||||
model = perm.model.model_class()
|
model = perm.model.model_class()
|
||||||
model.objects.filter(query).all()
|
model.objects.filter(query).all()
|
||||||
# print("Good query for permission", perm)
|
|
||||||
except (FieldError, AttributeError, ValueError, TypeError, JSONDecodeError):
|
except (FieldError, AttributeError, ValueError, TypeError, JSONDecodeError):
|
||||||
print("Query error for permission", perm)
|
print("Query error for permission", perm)
|
||||||
print("Query:", perm.query)
|
print("Query:", perm.query)
|
||||||
|
|
|
@ -183,7 +183,10 @@ $(document).ready(function () {
|
||||||
|
|
||||||
if (location.hash) { $('#type_' + location.hash.substr(1)).click() } else { type_transfer.click() }
|
if (location.hash) { $('#type_' + location.hash.substr(1)).click() } else { type_transfer.click() }
|
||||||
|
|
||||||
$('#source_me').click(function () {
|
$('#source_me').click(function (event) {
|
||||||
|
// Prevent TurboLinks
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
if (LOCK) { return }
|
if (LOCK) { return }
|
||||||
|
|
||||||
// Shortcut to set the current user as the only emitter
|
// Shortcut to set the current user as the only emitter
|
||||||
|
|
Loading…
Reference in New Issue