Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
prgTW committed Feb 19, 2024
1 parent 16eb229 commit 81f39c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Filter/ModelFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Sonata\AdminBundle\Form\Type\Filter\ChoiceType;
use Sonata\AdminBundle\Form\Type\Filter\DefaultType;
use Sonata\AdminBundle\Form\Type\ModelType;

/**
* @author Toni Uebernickel <[email protected]>
Expand Down Expand Up @@ -66,7 +67,7 @@ public function getRenderSettings()
{
return array(DefaultType::class, array(
'operator_type' => 'sonata_type_equal',
'field_type' => 'model',
'field_type' => ModelType::class,
'field_options' => $this->getFieldOptions(),
'label' => $this->getLabel(),
));
Expand Down
12 changes: 6 additions & 6 deletions Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ file that was distributed with this source code.
<span id="field_actions_{{ id }}" class="field-actions">
<span id="field_widget_{{ id }}" class="field-short-description">
{% if sonata_admin.field_description.associationadmin.id(sonata_admin.value) %}
{% render url('sonata_admin_short_object_information', {
'code': sonata_admin.field_description.associationadmin.code,
'objectId': sonata_admin.field_description.associationadmin.id(sonata_admin.value),
'uniqid': sonata_admin.field_description.associationadmin.uniqid,
'linkParameters': sonata_admin.field_description.options.link_parameters
}) %}
{{ render(controller('sonata_admin_short_object_information'), {
'code': sonata_admin.field_description.associationadmin.code,
'objectId': sonata_admin.field_description.associationadmin.id(sonata_admin.value),
'uniqid': sonata_admin.field_description.associationadmin.uniqid,
'linkParameters': sonata_admin.field_description.options.link_parameters
}) }}
{% elseif sonata_admin.field_description.options.placeholder is defined and sonata_admin.field_description.options.placeholder %}
<span class="inner-field-short-description">
{{ sonata_admin.field_description.options.placeholder|trans({}, 'SonataAdminBundle') }}
Expand Down

0 comments on commit 81f39c8

Please sign in to comment.