diff options
author | kondou <kondou@ts.unde.re> | 2013-08-15 10:34:12 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-25 21:05:40 +0200 |
commit | d7e6c77e208f561f994ce7b9f2274fb30b75049f (patch) | |
tree | a93c729e3b7fc52bf771a55e172700b03f5af36e /settings | |
parent | 9500109349f94546e4b43f6af755b20064ee9a64 (diff) | |
download | nextcloud-server-d7e6c77e208f561f994ce7b9f2274fb30b75049f.tar.gz nextcloud-server-d7e6c77e208f561f994ce7b9f2274fb30b75049f.zip |
Have a fancy uploadavatar button
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 4 | ||||
-rw-r--r-- | settings/templates/personal.php | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index ae939aaa9e6..8336e9c8362 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -157,6 +157,10 @@ $(document).ready(function(){ } }; + $('#uploadavatarbutton').click(function(){ + $('#uploadavatar').click(); + }); + $('#uploadavatar').fileupload(uploadparms); $('#selectavatar').click(function(){ diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 348716ca02d..93aaa5ac1e7 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -90,7 +90,8 @@ if($_['passwordChangeSupported']) { <img src="<?php print_unescaped(link_to('', 'avatar.php').'?user='.OC_User::getUser().'&size=128'); ?>"><br> <?php if ($_['avatar'] === "local"): ?> <em><?php p($l->t('Your avatar has to be a square and either a PNG or JPG image')); ?></em><br> - <input type="file" class="inlineblock button" name="files[]" id="uploadavatar" value="<?php p($l->t('Upload a new avatar')); ?>"> + <div class="inlineblock button" id="uploadavatarbutton"><?php p($l->t('Upload a new avatar')); ?></div> + <input type="file" class="hidden" name="files[]" id="uploadavatar"> <div class="inlineblock button" id="selectavatar"><?php p($l->t('Select a new avatar from your files')); ?></div> <div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove my avatar')); ?></div> <?php elseif ($_['avatar'] === "gravatar"): ?> |