Index: /main/waeup.custom/trunk/src/waeup/custom/applicants/browser.py
===================================================================
--- /main/waeup.custom/trunk/src/waeup/custom/applicants/browser.py	(revision 8016)
+++ /main/waeup.custom/trunk/src/waeup/custom/applicants/browser.py	(revision 8017)
@@ -24,8 +24,11 @@
 from waeup.kofa.widgets.phonewidget import PhoneWidget
 from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage,
-    OnlinePaymentCallbackPage, ExportPDFPage, ApplicantManageFormPage)
+    OnlinePaymentCallbackPage, ExportPDFPage,
+    ApplicantManageFormPage, ApplicantEditFormPage)
 from waeup.kofa.applicants.viewlets import RequestCallbackActionButton
-from waeup.kofa.applicants.interfaces import IApplicant, IApplicantEdit
-from waeup.custom.applicants.interfaces import IPGApplicant, IUGApplicant
+from waeup.kofa.applicants.pdf import PDFApplicationSlip
+#from waeup.kofa.applicants.interfaces import IApplicant, IApplicantEdit
+from waeup.custom.applicants.interfaces import (
+    IPGApplicant, IUGApplicant, IPGApplicantEdit, IUGApplicantEdit)
 from waeup.custom.interfaces import MessageFactory as _
 
@@ -43,17 +46,22 @@
         return
 
-class ExportPDFPage(ExportPDFPage):
-    """Deliver a PDF slip of the context.
-    """
-    grok.context(IApplicant)
-    grok.name('application_slip.pdf')
-    grok.require('waeup.viewApplication')
-    form_fields = grok.AutoFields(IApplicant).omit(
-        'locked', 'course_admitted')
-    form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')
-    prefix = 'form'
+class PDFApplicationSlip(PDFApplicationSlip):
 
+    @property
+    def form_fields(self):
+        target = getattr(self.context.__parent__, 'prefix', None)
+        if target is not None and target.startswith('pg'):
+            form_fields = grok.AutoFields(IPGApplicant).omit(
+                'locked', 'course_admitted')
+        else:
+            form_fields = grok.AutoFields(IUGApplicant).omit(
+                'locked', 'course_admitted')
+        form_fields[
+            'date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')
+        return form_fields
 
 class ApplicantDisplayFormPage(ApplicantDisplayFormPage):
+    """A display view for applicant data.
+    """
 
     @property
@@ -66,5 +74,6 @@
             form_fields = grok.AutoFields(IUGApplicant).omit(
                 'locked', 'course_admitted', 'password')
-        form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')
+        form_fields[
+            'date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')
         return form_fields
 
@@ -72,32 +81,40 @@
     """A full edit view for applicant data.
     """
-    grok.context(IApplicant)
-    grok.name('manage')
-    grok.require('waeup.manageApplication')
-    form_fields = grok.AutoFields(IApplicant)
-    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
-    form_fields['student_id'].for_display = True
-    form_fields['applicant_id'].for_display = True
-    form_fields['phone'].custom_widget = PhoneWidget
-    grok.template('applicanteditpage')
-    manage_applications = True
-    pnav = 3
-    display_actions = [[_('Save'), _('Final Submit')],
-        [_('Add online payment ticket'),_('Remove selected tickets')]]
+    
+    @property
+    def form_fields(self):
+        target = getattr(self.context.__parent__, 'prefix', None)
+        if target is not None and target.startswith('pg'):
+            form_fields = grok.AutoFields(IPGApplicant)
+        else:
+            form_fields = grok.AutoFields(IUGApplicant)
+        form_fields[
+            'date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
+        form_fields['phone'].custom_widget = PhoneWidget
+        form_fields['student_id'].for_display = True
+        form_fields['applicant_id'].for_display = True
+        form_fields['phone'].custom_widget = PhoneWidget
+        return form_fields
 
-
-class ApplicantEditFormPage(ApplicantManageFormPage):
+class ApplicantEditFormPage(ApplicantEditFormPage):
     """An applicant-centered edit view for applicant data.
     """
-    grok.context(IApplicantEdit)
-    grok.name('edit')
-    grok.require('waeup.handleApplication')
-    form_fields = grok.AutoFields(IApplicantEdit).omit(
-        'locked', 'course_admitted', 'student_id',
-        'screening_score', 'reg_number'
-        )
-    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
-    form_fields['phone'].custom_widget = PhoneWidget
-    form_fields['applicant_id'].for_display = True
-    grok.template('applicanteditpage')
-    manage_applications = False
+
+    @property
+    def form_fields(self):
+        target = getattr(self.context.__parent__, 'prefix', None)
+        if target is not None and target.startswith('pg'):
+            form_fields = grok.AutoFields(IPGApplicantEdit).omit(
+                'locked', 'course_admitted', 'student_id',
+                'screening_score', 'reg_number'
+                )
+        else:
+            form_fields = grok.AutoFields(IUGApplicantEdit).omit(
+                'locked', 'course_admitted', 'student_id',
+                'screening_score', 'reg_number'
+                )
+        form_fields[
+            'date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
+        form_fields['phone'].custom_widget = PhoneWidget
+        form_fields['applicant_id'].for_display = True
+        return form_fields
Index: /main/waeup.custom/trunk/src/waeup/custom/applicants/interfaces.py
===================================================================
--- /main/waeup.custom/trunk/src/waeup/custom/applicants/interfaces.py	(revision 8016)
+++ /main/waeup.custom/trunk/src/waeup/custom/applicants/interfaces.py	(revision 8017)
@@ -44,5 +44,5 @@
     """
 
-class IUGApplicantEdit(IApplicantProcessData):
+class IUGApplicantEdit(IUGApplicant):
     """An undergraduate applicant interface for editing.
 
@@ -56,5 +56,5 @@
     """
 
-class IPGApplicantEdit(IApplicantProcessData):
+class IPGApplicantEdit(IPGApplicant):
     """A postgraduate applicant interface for editing.
 
Index: /main/waeup.custom/trunk/src/waeup/custom/applicants/tests.py
===================================================================
--- /main/waeup.custom/trunk/src/waeup/custom/applicants/tests.py	(revision 8016)
+++ /main/waeup.custom/trunk/src/waeup/custom/applicants/tests.py	(revision 8017)
@@ -105,10 +105,18 @@
             % self.pgapplication_number)
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        # The IPGApplicant interface is really used in all pages
         self.browser.open(pgapplicant_path)
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        # The IPGApplicant interface is really used
         self.assertTrue('Employer' in self.browser.contents)
-        # If we move the applicant to the container,
-        # the Employer field disappears
+        self.browser.open(pgapplicant_path + '/manage')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertTrue('Employer' in self.browser.contents)
+        self.browser.open(pgapplicant_path + '/edit')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertTrue('Employer' in self.browser.contents)
+        self.browser.open(pgapplicant_path + '/application_slip.pdf')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        # If we lool at the applicant in the ug container,
+        # the employer field doesn't appear
         ugapplicant_path = ('http://localhost/app/applicants/app2011/%s'
             % self.ugapplication_number)
@@ -116,5 +124,12 @@
         self.browser.open(ugapplicant_path)
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
-
         self.assertFalse('Employer' in self.browser.contents)
+        self.browser.open(ugapplicant_path + '/manage')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertFalse('Employer' in self.browser.contents)
+        self.browser.open(ugapplicant_path + '/edit')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertFalse('Employer' in self.browser.contents)
+        self.browser.open(ugapplicant_path + '/application_slip.pdf')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
         return
