Ignore:
Timestamp:
17 Feb 2014, 06:47:07 (11 years ago)
Author:
Henrik Bettermann
Message:

Show proper flash message colors and other minor changes.

Location:
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/browser_templates/clearanceeditpage.pt

    r11013 r11105  
    1616  <div class="tab-content">
    1717    <div id="tab1" class="active tab-pane">
     18      <br />
    1819      <table class="form-table">
    1920        <tbody>
     
    3031
    3132    <div id="tab2" class="tab-pane">
     33      <br />
    3234      <table class="form-table">
    3335        <tbody>
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/viewlets.py

    r11013 r11105  
    825825    size = file_size(upload)
    826826    if size > max_size:
    827         view.flash(_('Uploaded file is too big.'))
     827        view.flash(_('Uploaded file is too big.'), type="danger")
    828828        return False
    829829    upload.seek(0) # file pointer moved when determining size
     
    831831    upload.seek(0) # same here
    832832    if file_format is None:
    833         view.flash(_('Could not determine file type.'))
     833        view.flash(_('Could not determine file type.'), type="danger")
    834834        return False
    835835    basename, expected_ext = os.path.splitext(download_name)
     
    837837        if '.' + file_format != expected_ext:
    838838            view.flash(_('${a} file extension expected.',
    839                 mapping = {'a':expected_ext[1:]}))
     839                mapping = {'a':expected_ext[1:]}), type="danger")
    840840            return False
    841841    else:
     
    843843            view.flash(
    844844                _('Only the following extensions are allowed: ${a}',
    845                 mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)}))
     845                mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)}),
     846                type="danger")
    846847            return False
    847848        download_name += '.' + file_format
     
    891892    template = default_fileupload_template
    892893    grok.require('waeup.uploadStudentFile')
    893     tab_redirect = '#tab2'
     894    tab_redirect = '#tab2-top'
    894895    mus = 1024 * 150
    895896    upload_button =_('Upload new file')
     
    931932                        self.context, self.view.__name__) + self.tab_redirect)
    932933            else:
    933                 self.view.flash(_('No local file selected.'))
     934                self.view.flash(_('No local file selected.'), type="danger")
    934935                self.view.redirect(
    935936                    self.view.url(
     
    986987    mus = 1024 * 150
    987988    download_name = u'birth_certificate'
    988     tab_redirect = '#tab2'
     989    tab_redirect = '#tab2-top'
    989990
    990991class Image(grok.View):
Note: See TracChangeset for help on using the changeset viewer.