1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Fix I'm the emitter button

This commit is contained in:
Alexandre Iooss 2020-09-06 21:38:55 +02:00
parent 48407cacf8
commit 89b2ff52e3
3 changed files with 6 additions and 4 deletions

View File

@ -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..." %}" />
<div id="source_me_div">
<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" %}
</span>
</a>
</div>
</div>
</div>

View File

@ -78,7 +78,6 @@ class PermissionQueryTestCase(TestCase):
query = instanced.query
model = perm.model.model_class()
model.objects.filter(query).all()
# print("Good query for permission", perm)
except (FieldError, AttributeError, ValueError, TypeError, JSONDecodeError):
print("Query error for permission", perm)
print("Query:", perm.query)

View File

@ -183,7 +183,10 @@ $(document).ready(function () {
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 }
// Shortcut to set the current user as the only emitter