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{ label{
width: 100%; 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; padding: 5px 0;
> img{ > img{
width: 24px; width: 20px;
} }
&:hover{ &:hover{

View File

@@ -886,6 +886,7 @@ Dict::Add('EN US', 'English', 'English', [
'UI:Schema:Events:Module' => 'Module', 'UI:Schema:Events:Module' => 'Module',
'UI:LinksWidget:Autocomplete+' => 'Type the first 3 characters...', 'UI:LinksWidget:Autocomplete+' => 'Type the first 3 characters...',
'UI:Edit:SearchQuery' => 'Select a predefined query', 'UI:Edit:SearchQuery' => 'Select a predefined query',
'UI:Edit:QueryBook' => 'Predefined query',
'UI:Edit:TestQuery' => 'Test query', 'UI:Edit:TestQuery' => 'Test query',
'UI:Combo:SelectValue' => '--- select a value ---', 'UI:Combo:SelectValue' => '--- select a value ---',
'UI:Label:SelectedObjects' => 'Selected objects: ', 'UI:Label:SelectedObjects' => 'Selected objects: ',

View File

@@ -53,7 +53,7 @@ class ChoicesElement extends HTMLSelectElement {
}; };
if (this.getAttribute('data-tom-select-disable-auto-complete')) { 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') !== '') { 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')); options.maxItems = parseInt(this.getAttribute('data-tom-select-max-items-selected'));

View File

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

View File

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

View File

@@ -137,7 +137,7 @@
{%- block form_label_content -%} {%- block form_label_content -%}
{{- parent() -}} {{- 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> <span role="marquee" class="ibo-button--icon fas" style="padding:6px;"></span>
</div> </div>
{%-endblock form_label_content -%} {%-endblock form_label_content -%}
@@ -166,7 +166,7 @@
{% if with_book_button %} {% 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"> <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> <span class="ibo-button--icon fas fa-book"></span>
{{ 'UI:Edit:SearchQuery'|trans }} {{ 'UI:Edit:QueryBook'|trans }}
</button> </button>
{% endif %} {% endif %}
</div> </div>