From 74ffa00047adb7d59a6aa4e35b67e4f18b16bc69 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 2 Jan 2025 13:45:23 +0600 Subject: [PATCH] pkp/pkp-lib#10698 Notification settings missing ID fix --- templates/user/notificationSettingsForm.tpl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/templates/user/notificationSettingsForm.tpl b/templates/user/notificationSettingsForm.tpl index 8a06d5a80d0..69a88a04e29 100644 --- a/templates/user/notificationSettingsForm.tpl +++ b/templates/user/notificationSettingsForm.tpl @@ -31,15 +31,20 @@ {csrf} {include file="controllers/notification/inPlaceNotification.tpl" notificationId="notificationSettingsFormNotification"} - {fbvFormArea id="notificationSettings"} {foreach from=$notificationSettingCategories item=notificationSettingCategory}

{translate key=$notificationSettingCategory.categoryKey}

{foreach from=$notificationSettingCategory.settings item=settingId} - {assign var="settingName" value=$notificationSettings.$settingId.settingName} - {assign var="emailSettingName" value=$notificationSettings.$settingId.emailSettingName} - {capture assign="settingKey"}{translate key=$notificationSettings.$settingId.settingKey title="common.title"|translate}{/capture} - + {if isset($notificationSettings[$settingId])} + {assign var="settingName" value=$notificationSettings.$settingId.settingName} + {assign var="emailSettingName" value=$notificationSettings.$settingId.emailSettingName} + {else} + {assign var="settingName" value="settingName_{$settingId}"} + {assign var="emailSettingName" value="emailSettingName_{$settingId}"} + {/if} + {capture assign="settingKey"} + {translate key=$notificationSettings.$settingId.settingKey title="common.title"|translate} + {/capture} {fbvFormSection title=$settingKey list=true translate=false} {if $settingId|in_array:$blockedNotifications} {assign var="checked" value="0"}