Skip to content

Commit 5e2dfaa

Browse files
committed
Clean up logic
1 parent 696febf commit 5e2dfaa

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

notification/method/webpush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public function get_ucp_template_data(helper $controller_helper, form_helper $fo
395395
'U_WEBPUSH_WORKER_URL' => $controller_helper->route('phpbb_webpushnotifications_ucp_push_worker_controller'),
396396
'SUBSCRIPTIONS' => $subscriptions,
397397
'WEBPUSH_FORM_TOKENS' => $form_helper->get_form_tokens(\phpbb\webpushnotifications\ucp\controller\webpush::FORM_TOKEN_UCP),
398-
'S_WEBPUSH_POPUP_PROMPT' => $this->config['wpn_webpush_popup_prompt'] && $this->user->id() != ANONYMOUS && $this->user->data['user_type'] != USER_IGNORE && !($this->user->data['user_wpn_popup_disabled'] ?? 0),
398+
'S_WEBPUSH_POPUP_PROMPT' => $this->config['wpn_webpush_popup_prompt'] && $this->user->id() != ANONYMOUS && $this->user->data['user_type'] != USER_IGNORE,
399399
'S_WEBPUSH_POPUP_DISABLED' => $this->user->data['user_wpn_popup_disabled'] ?? 0,
400400
];
401401
}

styles/all/template/webpush_popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% if S_WEBPUSH_POPUP_PROMPT %}
1+
{% if S_WEBPUSH_POPUP_PROMPT and not S_WEBPUSH_POPUP_DISABLED %}
22
<div id="wpn_popup_prompt" class="wpn-popup-overlay" style="display:none;" role="dialog" aria-modal="true" aria-labelledby="wpn_popup_title" aria-describedby="wpn_popup_message">
33
<div class="wpn-popup-container">
44
<div class="wpn-popup-content">

styles/prosilver/template/event/ucp_notifications_content_before.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<dl>
1414
<dt><label for="toggle_popup_prompt">{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE') ~ lang('COLON') }}</label><br><span>{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLE_EXPLAIN') }}</span></dt>
1515
<dd>
16-
<input id="toggle_popup_prompt" type="button" name="toggle_popup_prompt" value="{% if S_WEBPUSH_POPUP_DISABLED %}{{ lang('NOTIFY_WEBPUSH_POPUP_ENABLER') }}{% else %}{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLER') }}{% endif %}" class="button1 button button-form" data-l-disable="{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLER')|e('html_attr') }}" data-l-enable="{{ lang('NOTIFY_WEBPUSH_POPUP_ENABLER')|e('html_attr') }}">
16+
<input id="toggle_popup_prompt" type="button" name="toggle_popup_prompt" value="{{ lang(S_WEBPUSH_POPUP_DISABLED ? 'NOTIFY_WEBPUSH_POPUP_ENABLER' : 'NOTIFY_WEBPUSH_POPUP_DISABLER') }}" class="button1 button button-form" data-l-disable="{{ lang('NOTIFY_WEBPUSH_POPUP_DISABLER')|e('html_attr') }}" data-l-enable="{{ lang('NOTIFY_WEBPUSH_POPUP_ENABLER')|e('html_attr') }}">
1717
</dd>
1818
</dl>
1919
{% endif %}

0 commit comments

Comments
 (0)