Changeset 9052


Ignore:
Timestamp:
26 Jul 2012, 06:20:35 (12 years ago)
Author:
Henrik Bettermann
Message:

Display all text fields properly.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r8922 r9052  
    221221            self.widgets['next_kin_address'].cssClass = 'span8'
    222222            self.widgets['next_kin_address'].height = 6
     223        if self.widgets.get('notice'):
     224            self.widgets['notice'].cssClass = 'span8'
     225            self.widgets['notice'].height = 6
    223226        if self.widgets.get('description'):
    224227            self.widgets['description'].cssClass = 'span12'
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py

    r9040 r9052  
    8383
    8484    Main things fixed here:
    85 
     85    If html code:
    8686    - remove newlines (not visible in HTML but visible in PDF)
    8787    - add <br> tags after <div> (as divs break lines in HTML but not in PDF)
     88    If not html code:
     89    - just replace newlines by <br> tags
    8890    """
    89     # Add br tag if widgets contain div tags
    90     # which are not supported by reportlab
    91     html = html.replace('</div>', '</div><br />')
    92     html = html.replace('\n', '')
     91    if '</' in html:
     92        # Add br tag if widgets contain div tags
     93        # which are not supported by reportlab
     94        html = html.replace('</div>', '</div><br />')
     95        html = html.replace('\n', '')
     96    else:
     97        html = html.replace('\n', '<br />')
    9398    return html
    9499
Note: See TracChangeset for help on using the changeset viewer.