fix: show notification box when adding a comment

Currently, the "Enable notifications" checkbox
is only shown when editing a comment.

We should also show it when a new comment is about to be added.

Signed-off-by: moson-mo <mo-son@mailbox.org>
This commit is contained in:
moson-mo 2023-01-22 15:54:31 +01:00
parent 65ba735f18
commit 36fd58d7a6
No known key found for this signature in database
GPG key ID: 4A4760AB4EE15296
2 changed files with 26 additions and 3 deletions

View file

@ -33,7 +33,7 @@ Routes:
<button type="submit" class="button">
{{ ("Save" if comment else "Add Comment") | tr }}
</button>
{% if comment and not request.user.notified(pkgbase) %}
{% if not request.user.notified(pkgbase) %}
<span class="comment-enable-notifications">
<input type="checkbox" name="enable_notifications"
id="id_enable_notifications" />