From 00ae7d0f59258e3d0d339d8e76f4a833999ecd3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 13 Mar 2023 22:50:59 +0100 Subject: [PATCH] make dropzone work on editing postings/Comments --- src/Module/Post/Edit.php | 6 +++++- view/templates/item/compose.tpl | 4 ++-- view/theme/frio/templates/comment_item.tpl | 2 +- view/theme/frio/templates/jot.tpl | 16 ++++++++-------- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Module/Post/Edit.php b/src/Module/Post/Edit.php index 6311deb182..d5b27d648f 100644 --- a/src/Module/Post/Edit.php +++ b/src/Module/Post/Edit.php @@ -28,6 +28,7 @@ use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; +use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Post; use Friendica\Model\User; @@ -35,8 +36,8 @@ use Friendica\Module\Response; use Friendica\Navigation\SystemMessages; use Friendica\Network\HTTPException; use Friendica\Util\Crypto; +use Friendica\Util\Strings; use Friendica\Util\Profiler; -use Friendica\DI; use Psr\Log\LoggerInterface; /** @@ -184,6 +185,9 @@ class Edit extends BaseModule '$compose_link_title' => $this->t('Open Compose page'), // Dropzone + //'$max_imagesize' => Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')); + //'$max_imagesize' => \Friendica\\Util\\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')); + // both not working, so just workaround here until fixed '$max_imagesize' => DI::config()->get('system', 'maximagesize'), ]); diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index decb67eca8..3db9a64f55 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,4 +1,4 @@ -
+

{{$l10n.compose_title}}

{{if $l10n.always_open_compose}}

{{$l10n.always_open_compose nofilter}}

@@ -97,7 +97,7 @@
+