Ignore:
Timestamp:
22 Feb 2014, 15:46:03 (11 years ago)
Author:
uli
Message:

Merge changes from uli-diazo-themed back into trunk. If this works, then a miracle happened.

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk

  • main/waeup.kofa/trunk/src/waeup/kofa

  • main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py

    r10816 r11254  
    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(
     
    959960    mus = 1024 * 50
    960961    download_name = u'passport.jpg'
    961     tab_redirect = '?tab2'
     962    tab_redirect = '#tab2'
    962963
    963964class PassportUploadEdit(PassportUploadManage):
     
    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.