- {% with { 'compound': false } %}{{- block('form_label') }}{% endwith %}
+ {% with { 'compound': false } %}{{ block('form_label') }}{% endwith %}
+ {% if has_focus_mode %}
+ {{- block('focus_mode') }}
+ {% endif %}
+
{% if widget_container_block is defined %}
{{ widget_container_block|raw }}
{% else %}
diff --git a/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig b/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
index 19fe07aae0..1492d16fe1 100644
--- a/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
@@ -503,3 +503,49 @@
{{- form_errors(form) -}}
{%- endblock %}
+
+{%- block focus_mode -%}
+ {%- set title_icon -%}
+
+
+ {% include '@ibexadesign/ui/component/alert/alert.html.twig' with {
+ type: 'complementary',
+ title,
+ icon_path: ibexa_icon_path('system-information'),
+ show_close_btn: true
+ } only %}
+
+
+
+
+
+
+{%- endblock -%}
diff --git a/src/lib/Behat/Component/Fields/RichText.php b/src/lib/Behat/Component/Fields/RichText.php
index 1fe5e34120..15fda86f61 100644
--- a/src/lib/Behat/Component/Fields/RichText.php
+++ b/src/lib/Behat/Component/Fields/RichText.php
@@ -57,13 +57,6 @@ public function getValue(): array
return [$this->getFieldInput()->getText()];
}
- public function openElementsToolbar(): void
- {
- $this->focusFieldInput();
- $script = "document.querySelector('.ck-toolbar__grouped-dropdown > .ck-dropdown__button').click()";
- $this->getSession()->executeScript($script);
- }
-
public function changeStyle(string $style): void
{
$this->focusFieldInput();
@@ -130,13 +123,11 @@ public function addUnorderedList(array $listElements): void
public function clickEmbedInlineButton(): void
{
- $this->openElementsToolbar();
$this->clickElementsToolbarButton('Embed inline');
}
public function clickEmbedButton(): void
{
- $this->openElementsToolbar();
$this->clickElementsToolbarButton('Embed');
}
@@ -184,8 +175,7 @@ private function executeCommand(string $commandName): void
private function clickElementsToolbarButton(string $buttonText): void
{
$script = sprintf(
- "Array.from(document.querySelectorAll('%s %s')).filter(e => e.textContent =='%s')[0].click()",
- $this->getLocator('additionalToolbar')->getSelector(),
+ "Array.from(document.querySelectorAll('%s')).filter(e => e.textContent =='%s')[0].click()",
$this->getLocator('toolbarElement')->getSelector(),
$buttonText
);