Mercurial > libervia-web
diff src/browser/sat_browser/file_tools.py @ 494:5d8632a7bfde
browser_side: refactorisation of menus and LiberviaWidget's header
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 15 Jul 2014 18:43:55 +0200 |
parents | bbdc5357dc00 |
children | 6d3142b782c3 |
line wrap: on
line diff
--- a/src/browser/sat_browser/file_tools.py Tue Jul 15 13:39:36 2014 +0200 +++ b/src/browser/sat_browser/file_tools.py Tue Jul 15 18:43:55 2014 +0200 @@ -151,3 +151,13 @@ else: Window.alert(_('Submit error: %s' % result)) self.upload_btn.setEnabled(True) + + +class AvatarUpload(FileUploadPanel): + def __init__(self): + texts = {'ok_button': 'Upload avatar', + 'body': 'Please select an image to show as your avatar...<br>Your picture must be a square and will be resized to 64x64 pixels if necessary.', + 'errback': "Can't open image... did you actually submit an image?", + 'body_errback': 'Please select another image file.', + 'callback': "Your new profile picture has been set!"} + FileUploadPanel.__init__(self, 'upload_avatar', 'avatar_path', 2, texts)