Index: main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- main/waeup.kofa/trunk/CHANGES.txt	(revision 16242)
+++ main/waeup.kofa/trunk/CHANGES.txt	(revision 16243)
@@ -4,4 +4,7 @@
 1.6.1.dev0 (unreleased)
 =======================
+
+* Save email address provided by mandate when referee report
+  is created. Add `RefereeReportManageFormPage` (no button available).
 
 * Show submitted transcript application records on
Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 16242)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 16243)
@@ -1862,4 +1862,29 @@
         'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
 
+class RefereeReportManageFormPage(KofaEditFormPage):
+    """A displaymanage for referee reports.
+    """
+    grok.context(IApplicantRefereeReport)
+    grok.name('manage')
+    grok.require('waeup.managePortal')
+    label = _('Manage Referee Report')
+    pnav = 3
+    form_fields = grok.AutoFields(IApplicantRefereeReport).omit('creation_date')
+
+    @action(_('Save'), style='primary')
+    def save(self, **data):
+        changed_fields = self.applyData(self.context, **data)
+        # Turn list of lists into single list
+        if changed_fields:
+            changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
+        else:
+            changed_fields = []
+        fields_string = ' + '.join(changed_fields)
+        self.flash(_('Form has been saved.'))
+        if fields_string:
+            self.context.__parent__.writeLogMessage(
+                self, '%s - saved: %s' % (self.context.r_id, fields_string))
+        return
+
 class RemoveRefereeReportPage(UtilityView, grok.View):
     """
@@ -1941,5 +1966,5 @@
                 'name').field.default = mandate.params['name']
             self.form_fields.get(
-                'email').field.default = mandate.params['email']
+                'email_pref').field.default = mandate.params['email']
             self.passport_url = self.url(
                 self.context, 'passport_for_report.jpg') + '?%s' % urlencode(args)
@@ -1956,4 +1981,5 @@
         timestamp = ("%d" % int(time()*10000))[1:]
         report.r_id = "r%s" % timestamp
+        report.email = self.mandates[self.mandate_id].params['email']
         self.applyData(report, **data)
         self.context[report.r_id] = report
Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 16242)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 16243)
@@ -673,4 +673,5 @@
 
     r_id = Attribute('Report identifier')
+    email = Attribute('Referee email address taken from the mandate')
 
     creation_date = schema.Datetime(
@@ -685,9 +686,9 @@
         )
 
-    email = schema.ASCIILine(
-        title = _(u'Referee Email Address'),
-        #required = True,
-        #constraint=validate_email,
-        readonly = True,
+    email_pref = schema.ASCIILine(
+        title = _(u'Preferred Email Address'),
+        required = False,
+        constraint=validate_email,
+        readonly = False,
         )
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/refereereport.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/refereereport.py	(revision 16242)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/refereereport.py	(revision 16243)
@@ -42,4 +42,5 @@
         self.r_id = None
         self.creation_date = datetime.utcnow()
+        self.email = None
         return
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 16242)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 16243)
@@ -25,5 +25,4 @@
 import grok
 import logging
-from datetime import datetime
 from StringIO import StringIO
 from datetime import datetime, date, timedelta
@@ -1805,5 +1804,5 @@
         return
 
-    def test_add_and_view_reports(self):
+    def test_add_and_view_manage_reports(self):
         mandate = RefereeReportMandate()
         mandate.params['name'] = u'John Referee'
@@ -1844,4 +1843,6 @@
         self.assertEqual(len(self.applicant.refereereports), 1)
         report = self.applicant.refereereports[0]
+        # The email address has been stored
+        self.assertEqual(report.email, 'aa@aa.aa')
         # Referee can use mandate again to download the pdf report
         self.browser.open('http://localhost/app/mandate?mandate_id=%s'
@@ -1875,7 +1876,4 @@
         self.assertEqual(self.browser.headers['Content-Type'],
                          'application/pdf')
-        path = os.path.join(samples_dir(), 'referee_report_slip.pdf')
-        open(path, 'wb').write(self.browser.contents)
-        print "Sample PDF referee_report_slip.pdf written to %s" % path
         # Mandate is not deleted ...
         self.assertEqual(len(self.app['mandates'].keys()), 2)
@@ -1888,4 +1886,9 @@
             self.app['mandates'][mandate.mandate_id].params['redirect_path2'],
             redirect_path2)
+        # Portal managers can edit referee reports (no button available!)
+        self.browser.open(self.view_path + '/%s/manage' % report.r_id)
+        self.browser.getControl(name="form.email_pref").value = 'bb@bb.de'
+        self.browser.getControl("Save").click()
+        self.assertEqual(report.email_pref, 'bb@bb.de')
         # Managers can delete referee reports
         self.browser.open(self.manage_path)
@@ -1896,5 +1899,5 @@
         self.assertTrue('Referee report removed.' in self.browser.contents)
         self.assertEqual(self.browser.url, self.view_path)
-        # Report creation and deletion is logged
+        # Report creation, managing and deletion is logged
         logfile = os.path.join(
             self.app['datacenter'].storage, 'logs', 'applicants.log')
@@ -1904,4 +1907,8 @@
             '%s - added: %s\n' % (self.applicant.applicant_id, report.r_id)
             in logcontent)
+        self.assertTrue(
+            'zope.mgr - applicants.browser.RefereeReportManageFormPage - '
+            '%s - %s - saved: email_pref\n' % (
+            self.applicant.applicant_id, report.r_id) in logcontent)
         self.assertTrue(
             'zope.mgr - applicants.browser.RemoveRefereeReportPage - '
