Changeset 11844 for main


Ignore:
Timestamp:
15 Oct 2014, 07:06:39 (10 years ago)
Author:
Henrik Bettermann
Message:

Customize pdf slip. Add logo and watermark.

Location:
main/kofacustom.pcn/trunk/src/kofacustom/pcn
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.pcn/trunk/src/kofacustom/pcn/applicants/browser.py

    r11843 r11844  
    1919"""
    2020import grok
     21from waeup.kofa.widgets.datewidget import (
     22    FriendlyDateDisplayWidget, FriendlyDateDisplayWidget,)
    2123from waeup.kofa.applicants.browser import (
    2224    ApplicantRegistrationPage,
     
    2426    ApplicantDisplayFormPage,
    2527    ApplicantManageFormPage,
    26     ApplicantEditFormPage)
     28    ApplicantEditFormPage,
     29    )
     30from waeup.kofa.applicants.pdf import PDFApplicationSlip
    2731from waeup.kofa.applicants.viewlets import (
    2832    StudentCreateActionButton,
     
    8589        form_fields['reg_number'].for_display = True
    8690        return form_fields
     91
     92class CustomPDFApplicationSlip(PDFApplicationSlip):
     93    """Bypass NigeriaPDFApplicationSlip
     94    """
     95
     96    form_fields =  grok.AutoFields(ICustomApplicant).omit(
     97        'locked', 'course_admitted', 'suspended', 'sex', 'course2'
     98        )
     99    form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')
  • main/kofacustom.pcn/trunk/src/kofacustom/pcn/applicants/utils.py

    r11841 r11844  
    3434      'sop': ['Scientific Office Permit', 'XXX'],
    3535      }
     36
     37    SEPARATORS_DICT = {
     38      }
  • main/kofacustom.pcn/trunk/src/kofacustom/pcn/browser/pdf.py

    r10765 r11844  
    2727    """
    2828
    29     #header_logo_path = os.path.join(
    30     #    os.path.dirname(__file__), 'static', 'pdf_logo.jpg')
    31     #watermark_path = os.path.join(
    32     #    os.path.dirname(__file__), 'static', 'pdf_watermark.jpg')
     29    header_logo_path = os.path.join(
     30        os.path.dirname(__file__), 'static', 'pdf_logo.jpg')
     31    watermark_path = os.path.join(
     32        os.path.dirname(__file__), 'static', 'pdf_watermark.jpg')
    3333
    34     watermark_pos = [-25, 100]
    35     logo_pos = [507, 720, 40]
     34    watermark_pos = [95, 160]
     35    logo_pos = [507, 730, 40]
  • main/kofacustom.pcn/trunk/src/kofacustom/pcn/locales/en/LC_MESSAGES/waeup.kofa.po

    r11843 r11844  
    283283msgid "Initial School Fee"
    284284msgstr "Registration Fee"
     285
     286msgid "Desired Study Courses"
     287msgstr "Desired License"
  • main/kofacustom.pcn/trunk/src/kofacustom/pcn/utils/utils.py

    r11839 r11844  
    4343
    4444    PAYMENT_CATEGORIES = {
    45         'registration': 'Registration Fee',
     45        'application': 'Registration Fee',
    4646        }
    4747
Note: See TracChangeset for help on using the changeset viewer.