Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.3' into 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Feb 24, 2023
2 parents c140fcd + ffcc71a commit cc20c9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/bundle/Resources/public/scss/_backdrop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
right: 0;
bottom: 0;
background-color: rgba($ibexa-color-dark, 0.4);

&--transparent {
background-color: transparent;
}
}
10 changes: 8 additions & 2 deletions src/lib/UserSetting/Autosave.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Ibexa\AdminUi\UserSetting;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use Ibexa\Contracts\User\UserSetting\FormMapperInterface;
use Ibexa\Contracts\User\UserSetting\ValueDefinitionInterface;
use Ibexa\Core\Base\Exceptions\InvalidArgumentException;
Expand All @@ -24,10 +25,15 @@ class Autosave implements ValueDefinitionInterface, FormMapperInterface
/** @var \Symfony\Contracts\Translation\TranslatorInterface */
private $translator;

/** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */
private $configResolver;

public function __construct(
TranslatorInterface $translator
TranslatorInterface $translator,
ConfigResolverInterface $configResolver
) {
$this->translator = $translator;
$this->configResolver = $configResolver;
}

public function getName(): string
Expand Down Expand Up @@ -57,7 +63,7 @@ public function getDisplayValue(string $storageValue): string

public function getDefaultValue(): string
{
return self::ENABLED_OPTION;
return $this->configResolver->getParameter('autosave.enabled') == false ? self::DISABLED_OPTION : self::ENABLED_OPTION;
}

public function mapFieldForm(
Expand Down

0 comments on commit cc20c9e

Please sign in to comment.