mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix some of @jancborchardt's complaints in oc_avatars
This commit is contained in:
parent
14cc1cd4b8
commit
e7e3f1b81a
4 changed files with 9 additions and 9 deletions
|
|
@ -34,7 +34,7 @@ class OC_Core_Avatar_Controller {
|
|||
\OC_Response::setETagHeader(crc32($image->data()));
|
||||
$image->show();
|
||||
} elseif ($image === false) {
|
||||
\OC_JSON::success(array('user' => \OC_User::getDisplayName($user), 'size' => $size));
|
||||
\OC_JSON::success(array('user' => $user, 'size' => $size));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ class OC_Core_Avatar_Controller {
|
|||
$tmpavatar = \OC_Cache::get('tmpavatar');
|
||||
if (is_null($tmpavatar)) {
|
||||
$l = new \OC_L10n('core');
|
||||
\OC_JSON::error(array("data" => array("message" => $l->t("No temporary avatar available, try again")) ));
|
||||
\OC_JSON::error(array("data" => array("message" => $l->t("No temporary profile picture available, try again")) ));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ class OC_Core_Avatar_Controller {
|
|||
$tmpavatar = \OC_Cache::get('tmpavatar');
|
||||
if (is_null($tmpavatar)) {
|
||||
$l = new \OC_L10n('core');
|
||||
\OC_JSON::error(array("data" => array("message" => $l->t("No temporary avatar available, try again")) ));
|
||||
\OC_JSON::error(array("data" => array("message" => $l->t("No temporary profile picture available, try again")) ));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class OC_Avatar {
|
|||
public function set ($user, $data) {
|
||||
if (\OC_Appconfig::getValue('files_encryption', 'enabled') === "yes") {
|
||||
$l = \OC_L10N::get('lib');
|
||||
throw new \Exception($l->t("Custom avatars don't work with encryption yet"));
|
||||
throw new \Exception($l->t("Custom profile pictures don't work with encryption yet"));
|
||||
}
|
||||
|
||||
$view = new \OC\Files\View('/'.$user);
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ $(document).ready(function(){
|
|||
$('#uploadavatar').fileupload(uploadparms);
|
||||
|
||||
$('#selectavatar').click(function(){
|
||||
OC.dialogs.filepicker(t('settings', "Select an avatar"), selectAvatar, false, "image");
|
||||
OC.dialogs.filepicker(t('settings', "Select a profile picture"), selectAvatar, false, "image");
|
||||
});
|
||||
|
||||
$('#removeavatar').click(function(){
|
||||
|
|
|
|||
|
|
@ -83,14 +83,14 @@ if($_['passwordChangeSupported']) {
|
|||
<?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
|
||||
<form id="avatar" method="post" action="<?php p(\OC_Helper::linkToRoute('core_avatar_post')); ?>">
|
||||
<fieldset class="personalblock">
|
||||
<legend><strong><?php p($l->t('Profile Image')); ?></strong></legend>
|
||||
<legend><strong><?php p($l->t('Profile picture')); ?></strong></legend>
|
||||
<div class="avatardiv"></div><br>
|
||||
<em><?php p($l->t('Has to be square and either PNG or JPG')); ?></em><br>
|
||||
<div class="warning hidden"></div>
|
||||
<div class="inlineblock button" id="uploadavatarbutton"><?php p($l->t('Upload new')); ?></div>
|
||||
<input type="file" class="hidden" name="files[]" id="uploadavatar">
|
||||
<div class="inlineblock button" id="selectavatar"><?php p($l->t('Select new from files')); ?></div>
|
||||
<div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove image')); ?></div>
|
||||
<div class="inlineblock button" id="selectavatar"><?php p($l->t('Select new from Files')); ?></div>
|
||||
<div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove image')); ?></div><br>
|
||||
<?php p($l->t('Either png or jpg. Ideally square but you will be able to crop it.')); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue