settings: Do not show tooltip if push notifications are enabled.

We previously showed tooltips about push notifictions not being
enabled on server on the checkboxes in "Notification triggers"
section incorrectly when server had push notifications enabled.

This bug was present as realm_push_notifications_enabled was
not passed to the template correctly. This commit fixes it by
instead using "is_disabled" in the "if" condition as we only
expect it to be true when push notifications are not enabled
on server.

(cherry picked from commit 99f29983a1)
This commit is contained in:
Sahil Batra 2023-12-21 20:30:31 +05:30 committed by Alex Vandiver
parent 17631304c2
commit 4e549e684f
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<td>
<span {{#if (and is_mobile_checkbox (not realm_push_notifications_enabled))}} class="tippy-zulip-tooltip" data-tooltip-template-id="mobile-push-notification-tooltip-template"{{/if}}>
<span {{#if (and is_mobile_checkbox is_disabled)}} class="tippy-zulip-tooltip" data-tooltip-template-id="mobile-push-notification-tooltip-template"{{/if}}>
<label class="checkbox">
<input type="checkbox" name="{{setting_name}}" id="{{prefix}}{{setting_name}}"
{{#if is_disabled}} disabled {{/if}}