3 from Products
.Plinn
.utils
import getAdapterByInterface
5 settings
= getAdapterByInterface(context
, 'Products.Plinn.interfaces.IEmailNotificationSettings')
7 form
= context
.REQUEST
.form
8 for interface
in settings
.getManagedEvents() :
9 register
= form
.get(interface
, False)
10 settings
.subscribeToEvent(interface
, register
)
11 context
.setStatus(True, 'Paramètres enregistrés')
12 return context
.setRedirect(context
, 'object/view', ajax
=form
.get('ajax'))
16 options
['notifications'] = settings
.myNotifications()
17 return context
.folder_notifications_template(**options
)