Index: main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- main/waeup.kofa/trunk/CHANGES.txt	(revision 16459)
+++ main/waeup.kofa/trunk/CHANGES.txt	(revision 16465)
@@ -5,5 +5,5 @@
 =======================
 
-* Enable managers to remove all flash notices of students in a department.
+* Enable managers to edit/remove all flash notices of students in a department.
 
 1.7 (2021-04-13)
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py	(revision 16459)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py	(revision 16465)
@@ -560,6 +560,23 @@
             "'All students, who requested clearance in this department, will be cleared. Are you sure?'")
 
-class RemoveFlashDepartmentStudentsActionButton(ManageActionButton):
-    """ 'Remove all flash notices' button for departments.
+#class RemoveFlashDepartmentStudentsActionButton(ManageActionButton):
+#    """ 'Remove all flash notices' button for departments.
+#    """
+#    grok.context(IDepartment)
+#    grok.view(DepartmentPage)
+#    grok.name('removeflashdepartmentstudents')
+#    grok.require('waeup.manageStudent')
+#    icon = 'actionicon_wipe.png'
+#    text = _('Remove all flash notices')
+#    target = 'removeflash'
+#    grok.order(5)
+
+#    @property
+#    def onclick(self):
+#        return "return window.confirm(%s);" % _(
+#            "'Flash notices of all students in this department will be removed. Are you sure?'")
+
+class EditFlashDepartmentStudentsActionButton(ManageActionButton):
+    """ 'Edit all flash notices' button for departments.
     """
     grok.context(IDepartment)
@@ -567,13 +584,8 @@
     grok.name('removeflashdepartmentstudents')
     grok.require('waeup.manageStudent')
-    icon = 'actionicon_wipe.png'
-    text = _('Remove all flash notices')
-    target = 'removeflash'
+    icon = 'actionicon_flash.png'
+    text = _('Edit all flash notices')
+    target = 'edit_flash_notices'
     grok.order(5)
-
-    @property
-    def onclick(self):
-        return "return window.confirm(%s);" % _(
-            "'Flash notices of all students in this department will be removed. Are you sure?'")
 
 class ManageCourseActionButton(ManageActionButton):
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16459)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16465)
@@ -43,5 +43,5 @@
 from waeup.kofa.browser.interfaces import ICaptchaManager
 from waeup.kofa.browser.layout import (
-    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
+    KofaPage, KofaFormPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
     NullValidator, jsaction, action, UtilityView)
 from waeup.kofa.browser.pages import (
@@ -56,5 +56,5 @@
 from waeup.kofa.mandates.mandate import PasswordMandate, ParentsPasswordMandate
 from waeup.kofa.university.interfaces import (
-    IDepartment, ICertificate, ICourse)
+    IDepartment, ICertificate, ICourse, IFlashNotice)
 from waeup.kofa.university.certificate import (
     VirtualCertificateExportJobContainer)
@@ -3796,12 +3796,43 @@
         return
 
-class RemoveFlashNoticeAllStudentsInDepartmentView(UtilityView, grok.View):
-    """ Remove flash notices of all students in a department.
+#class RemoveFlashNoticeAllStudentsInDepartmentView(UtilityView, grok.View):
+#    """ Remove flash notices of all students in a department.
+#    """
+#    grok.context(IDepartment)
+#    grok.name('removeflash')
+#    grok.require('waeup.manageStudent')
+
+#    def update(self):
+#        cat = queryUtility(ICatalog, name='students_catalog')
+#        students = cat.searchResults(
+#            depcode=(self.context.code, self.context.code),
+#            )
+#        num = 0
+#        for student in students:
+#            student.flash_notice = u''
+#            num += 1
+#        self.flash(_('%d flash notices have been removed.' % num))
+#        self.redirect(self.url(self.context))
+#        return
+
+#    def render(self):
+#        return
+
+class EditFlashNoticesFormPage(KofaFormPage):
+    """Edit all flash notices of students in a department.
     """
     grok.context(IDepartment)
-    grok.name('removeflash')
+    grok.name('edit_flash_notices')
+    grok.template('editflashnotices')
     grok.require('waeup.manageStudent')
-
-    def update(self):
+    form_fields = grok.AutoFields(IFlashNotice)
+    pnav = 0
+
+    def label(self):
+        return _(u'Set flash notices for all students in ${a}',
+            mapping = {'a':self.context.longtitle})
+
+    @action('Save flash notices', style='primary')
+    def save(self, *args, **data):
         cat = queryUtility(ICatalog, name='students_catalog')
         students = cat.searchResults(
@@ -3810,12 +3841,17 @@
         num = 0
         for student in students:
-            student.flash_notice = u''
+            student.flash_notice = data['flash_notice']
             num += 1
-        self.flash(_('%d flash notices have been removed.' % num))
+        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
+        grok.getSite().logger.info(
+            '%s - %s - saved flash notice: %s'
+            % (ob_class, self.context.__name__, data['flash_notice']))
+        self.flash(_('%d flash notices have been edited.' % num))
         self.redirect(self.url(self.context))
         return
 
-    def render(self):
-        return
+    @action(_('Cancel'), validator=NullValidator)
+    def cancel(self, **data):
+        self.redirect(self.url(self.context))
 
 class EditScoresPage(KofaPage):
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 16459)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 16465)
@@ -1882,11 +1882,35 @@
         return
 
-    def test_remove_all_flash_notices(self):
+    #def test_remove_all_flash_notices(self):
+    #    self.student.flash_notice = u'test'
+    #    self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+    #    self.browser.open('http://localhost/app/faculties/fac1/dep1')
+    #    self.browser.getLink("Remove all flash notices").click()
+    #    self.assertTrue('1 flash notices have been removed' in self.browser.contents)
+    #    self.assertEqual(self.student.flash_notice, '')
+    #    return
+
+    def test_edit_all_flash_notices(self):
         self.student.flash_notice = u'test'
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open('http://localhost/app/faculties/fac1/dep1')
-        self.browser.getLink("Remove all flash notices").click()
-        self.assertTrue('1 flash notices have been removed' in self.browser.contents)
-        self.assertEqual(self.student.flash_notice, '')
+        self.browser.getLink("Edit all flash notices").click()
+        self.browser.getControl(name="form.flash_notice").value = 'Hello'
+        self.browser.getControl("Save flash notices").click()
+        self.assertTrue('1 flash notices have been edited' in self.browser.contents)
+        self.assertEqual(self.student.flash_notice, 'Hello')
+        self.browser.getLink("Edit all flash notices").click()
+        self.browser.getControl("Save flash notices").click()
+        self.assertTrue('1 flash notices have been edited' in self.browser.contents)
+        self.assertEqual(self.student.flash_notice, None)
+        logfile = os.path.join(
+            self.app['datacenter'].storage, 'logs', 'main.log')
+        logcontent = open(logfile).read()
+        self.assertTrue(
+            'zope.mgr - students.browser.EditFlashNoticesFormPage - dep1 - '
+            'saved flash notice: Hello' in logcontent)
+        self.assertTrue(
+            'zope.mgr - students.browser.EditFlashNoticesFormPage - dep1 - '
+            'saved flash notice: None' in logcontent)
         return
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py	(revision 16459)
+++ main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py	(revision 16465)
@@ -76,6 +76,7 @@
     def addFaculty(faculty):
         """Add an IFactulty object.
-
         """
+
+
 class IDepartment(IKofaObject):
     """Representation of a department.
@@ -137,4 +138,17 @@
 
 
+class IFlashNotice(IKofaObject):
+    """An interface for the flash notice edit form page.
+    """
+
+    flash_notice = schema.TextLine(
+        title = _(u'Flash Notice'),
+        description = _(
+            u'If you save an empty field, all flash notices will be removed.'),
+        required = False,
+        readonly = False,
+        )
+
+
 class ICoursesContainer(IKofaContainer):
     """A container for faculties.
@@ -145,4 +159,5 @@
         Returns the key, under which the object was stored.
         """
+
 
 class ICourse(IKofaObject):
@@ -216,4 +231,5 @@
         default = False,
         )
+
 
 class ICertificate(IKofaObject):
@@ -341,4 +357,5 @@
         """
 
+
 class ICertificateCourse(IKofaObject):
     """A certificatecourse is referring a course and provides some own
