Add ChoiceImageFormBlock

This commit is contained in:
Benjamin DALSASS
2026-01-14 08:19:03 +01:00
parent e4a281c3ff
commit 975046da17
7 changed files with 979 additions and 974 deletions

View File

@@ -84,6 +84,8 @@ collection-entry-element {
label{
width: 100%;
max-width: unset;
padding-right: 0;
}
}

View File

@@ -63,7 +63,7 @@ $ibo-input-select-icon--menu--icon--margin-right: 10px !default;
padding: 5px 0;
> img{
width: 24px;
width: 20px;
}
&:hover{

File diff suppressed because it is too large Load Diff

View File

@@ -53,7 +53,7 @@ class ChoicesElement extends HTMLSelectElement {
};
if (this.getAttribute('data-tom-select-disable-auto-complete')) {
// options.controlInput = null;
options.controlInput = null;
}
if (this.getAttribute('data-tom-select-max-items-selected') && this.getAttribute('data-tom-select-max-items-selected') !== '') {
options.maxItems = parseInt(this.getAttribute('data-tom-select-max-items-selected'));

View File

@@ -23,6 +23,8 @@ class ChoiceImageFormBlock extends ChoiceFormBlock
{
parent::RegisterOptions($oOptionsRegister);
$oOptionsRegister->SetOption('disable_auto_complete', true);
$oOptionsRegister->SetOption('plugins', [
[
'name' => 'image_renderer',

View File

@@ -42,7 +42,7 @@ class ChoiceFormType extends AbstractType
// options to control the inline display of choices
$resolver->setDefault('inline_display', true);
$resolver->setDefault('max_items_selected', '');
$resolver->setDefault('disable_auto_complete', true);
$resolver->setDefault('disable_auto_complete', false);
$resolver->setDefined('plugins');
}

View File

@@ -137,7 +137,7 @@
{%- block form_label_content -%}
{{- parent() -}}
<div style="float: right;display: flex;flex-direction: column;align-items: center;row-gap: 3px;margin-top: 5px;">
<div style="float: right;display: flex;flex-direction: column;align-items: center;row-gap: 3px;">
<span role="marquee" class="ibo-button--icon fas" style="padding:6px;"></span>
</div>
{%-endblock form_label_content -%}
@@ -166,7 +166,7 @@
{% if with_book_button %}
<button class="ibo-button ibo-button ibo-block ibo-is-alternative ibo-is-neutral " data-role="ibo-button" data-action="book" type="button" name="Open Book" value="" aria-label="Open Query Phrases Book">
<span class="ibo-button--icon fas fa-book"></span>
{{ 'UI:Edit:SearchQuery'|trans }}
{{ 'UI:Edit:QueryBook'|trans }}
</button>
{% endif %}
</div>