- Timestamp:
- 21 Jun 2013, 07:26:10 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
r10319 r10329 95 95 return [x is not None and x.longtitle() or x for x in dept, faculty] 96 96 97 def _add Comments(self, data):97 def _addLoginInformation(self): 98 98 if self.context.state == 'created': 99 99 comment = translate(_( 100 ' Proceed to the login page of the portal' +100 '\n Proceed to the login page of the portal' + 101 101 ' and enter your new credentials:' + 102 102 ' user name= ${a}, password = ${b}. ' + … … 106 106 'b':self.context.application_number} 107 107 )) 108 comment = Paragraph(comment, SMALL_PARA_STYLE) 109 data.extend([Spacer(1, 18), comment]) 110 return data 108 return comment 111 109 112 110 def _getPDFCreator(self): … … 150 148 data.append(header_table) 151 149 152 # append two-column table of widgets of those fields defined in153 # two_columns_design_fields154 fields = [155 field for field in self.form_fields156 if not field.__name__ in self.column_two_fields and157 field.__name__ in self.two_columns_design_fields]158 if fields:159 data.append(creator.getWidgetsTable(160 fields, self.context, view, lang=portal_language,161 domain='waeup.kofa', twoDataCols=True))162 163 150 # append widgets except those already added in column two 151 # and those in two_columns_design_fields 164 152 dept, faculty = self._getDeptAndFaculty() 165 153 fields = [ … … 174 162 dept=dept, faculty=faculty)) 175 163 176 # append comments 177 data = self._addComments(data) 164 # append two-column table of widgets of those fields defined in 165 # two_columns_design_fields 166 if len(self.two_columns_design_fields): 167 fields = [ 168 field for field in self.form_fields 169 if not field.__name__ in self.column_two_fields and 170 field.__name__ in self.two_columns_design_fields] 171 if fields: 172 data.append(creator.getWidgetsTable( 173 fields, self.context, view, lang=portal_language, 174 domain='waeup.kofa', separators=separators, 175 twoDataCols=True)) 178 176 179 return creator.create_pdf(data, None, doc_title, note=self.note) 177 # append login information 178 note = self.note + self._addLoginInformation() 179 180 return creator.create_pdf(data, None, doc_title, note=note)
Note: See TracChangeset for help on using the changeset viewer.