From: Tushar Nain Date: Sat, 16 Sep 2023 08:30:08 +0000 (+0530) Subject: Fixed : Comment notification settings are visible even if comments are disabled X-Git-Tag: v23.10~1^2~32^2~2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/6a5361d853eccda55eadb56ec249236cd4ab164e Fixed : Comment notification settings are visible even if comments are disabled Added a UX condition to display comment notification settings, only if the user has enabled the comment notifications. --- diff --git a/resources/views/users/preferences/notifications.blade.php b/resources/views/users/preferences/notifications.blade.php index ae89c087e..9817aac4d 100644 --- a/resources/views/users/preferences/notifications.blade.php +++ b/resources/views/users/preferences/notifications.blade.php @@ -20,20 +20,22 @@ 'label' => trans('preferences.notifications_opt_own_page_changes'), ]) -
- @include('form.toggle-switch', [ - 'name' => 'preferences[own-page-comments]', - 'value' => $preferences->notifyOnOwnPageComments(), - 'label' => trans('preferences.notifications_opt_own_page_comments'), - ]) -
-
- @include('form.toggle-switch', [ - 'name' => 'preferences[comment-replies]', - 'value' => $preferences->notifyOnCommentReplies(), - 'label' => trans('preferences.notifications_opt_comment_replies'), - ]) -
+ @if (!setting('app-disable-comments')) +
+ @include('form.toggle-switch', [ + 'name' => 'preferences[own-page-comments]', + 'value' => $preferences->notifyOnOwnPageComments(), + 'label' => trans('preferences.notifications_opt_own_page_comments'), + ]) +
+
+ @include('form.toggle-switch', [ + 'name' => 'preferences[comment-replies]', + 'value' => $preferences->notifyOnCommentReplies(), + 'label' => trans('preferences.notifications_opt_comment_replies'), + ]) +
+ @endif