javiereguiluz
Repos
124
Followers
1476
Following
1620

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.

3617
899

The Symfony documentation

1988
4727

Events

Dark mode - DateTimeField style

I have in crud controller a DateTimeField

yield DateTimeField::new('date', 'Date') ->setDisabled();

This field is in dark mode displayed incorrectly (text color on seconds) image

Created at 9 hours ago
issue comment
Dark mode - DateTimeField style

@skocdopolet I agree with @Holicz (thanks a lot for investigating this!)

Your original bug report included this image:

image

And your latest comment shows this:

image


In my opinion, the bug has been fixed because the color of the "seconds" number is now readable ... but it shows a slightly different color because, as @Holicz said, this happens when the seconds are not editable. Thanks.

Created at 9 hours ago
issue comment
adding Custom Web Assets doesn't work with FullCalendar

You said that the calendar is not displayed ... but we don't know the reason.

(1) If the CSS/JS assets that you added from the PHP classes aren't included in the generated HTML page, then it's an EasyAdmin bug. (2) If those files are included in the page ... then it might be a JavaScript code issue, so it wouldn't be an EasyAdmin bug.

We'd need more feedback to know if it's an EasyAdmin bug. Thanks.

Created at 9 hours ago
issue comment
Using a Type that contains script tag

I don't know what to say. It looks very strange that the <script> tag disappears. EasyAdmin doesn't process Twig form templates in any way, because we rely on Symfony for this. I'm sorry but I'm confused about this, so I'm afraid I can't help you much 😐

Created at 9 hours ago
issue comment
Symfony Stimulus Versioning breaks CSS and JS

@PGSdevelopment did this ultimately work? It's strange because I use EA in some Symfony projects that I upgrade continuously and I didn't see this error. I even updated to Encore 4.0 and it still worked.

I don't use Stimulus much in those projects, but I'm not sure why it should be a problem, because the one building assets is Encore and not Stimulus.

We'd need more info about this to see if we need to fix something. Thanks!

Created at 9 hours ago
How to translate menu and content separately

I am not sure if it is a bug, or must be a feature, or I just don't understand how to do it. Screenshot from 2022-09-24 22-19-31 My menu should be Posts and the page content should be Create post. But this is what happens when I try to translate the side menu.

#config/packages/easy_admin.yaml
easy_admin:
  entities:
    Post:
      class: App\Entity\Post
      list:
        fields:
          - { property: 'title' }
          - { property: 'post' }
# translations/messages.en.yaml
Post: Posts
title: Title
content: Content

P.S. My title and content translations doesn't work at all. Am I doing something wrong ?

Created at 9 hours ago
issue comment
How to translate menu and content separately

@TomaIvanovTomov sadly you are using the legacy EasyAdmin 2.x version which is no longer maintained. I don't remember if this is a bug, but if it is, we won't be able to fix it. If you can, please upgrade to EA 3 with the automatic command-line tool provided by EA 3 and then to EA 4 so you can enjoy the latest features and fixes. Thanks.

Created at 9 hours ago
Fix header in the lists

Short description of what this feature will allow to do: Fix the header (search + columns name + actions) to follow the scroll in the lists (like in edit form)

Example of how to use this feature I use setPaginatorPageSize(100), when i scroll i can't see the columns name and the actions. When I scroll in the edit form, the header follow the scroll. Could be possible to do the same ?

Created at 9 hours ago
issue comment
Fix header in the lists

@dwd-akira thanks for your proposal. After thinking about it, I've decided to not implement this for now because I think it's "a niche feature" (not enough users to justify the introduction of the feature).

Luckily there are different ways of adding custom CSS to backends, so maybe you can inject a few lines of CSS to achieve this. See https://symfony.com/bundles/EasyAdminBundle/current/design.html#adding-custom-web-assets

Cheers!

Created at 9 hours ago
Disabled DateField on non-required field still editable

I have a form where I want most of the fields to be disabled because they were input elsewhere (on the frontend). The fields are displayed within EasyAdmin so they can be reviewed. There are 2 DateField's and both are set to disabled. One of the fields is set as required and it is rendered non-editable in the browser as expected. The another is set as not required and it is rendered as still editable in the browser despite being set as disabled and it can be cleared with the "leave empty" checkbox.

I would expect that a disabled field regardless of whether it is required or not is non-editable.

This is with version 4.2.2

My model has "appliedOn" which is not nullable and dateOfBirth which is nullable.

In the crud controller configureFields function I have:

DateField::new('appliedOn')->setColumns(12)->addCssClass('horizontal')->setDisabled(true),
...
DateField::new('dateOfBirth')->hideOnIndex()->setColumns(12)->addCssClass('horizontal')->setDisabled(true),

If I add setRequired(true) to the second field it renders as disabled, if I add setRequired(false) to the first field it renders as editable.

I hope that makes sense, let me know if you need any further information.

Created at 9 hours ago
issue comment
Disabled DateField on non-required field still editable

Closing as explained in https://github.com/EasyCorp/EasyAdminBundle/pull/5376#issuecomment-1258434334 Thanks.

Created at 9 hours ago
pull request closed
Fix #5246
Created at 9 hours ago
issue comment
Fix #5246

I'm closing this one as fixed because in #5389 we entirely removed the "nullable control" feature for date fields. Thanks.

Created at 9 hours ago
issue comment
Fix: keep existing formatted value

Thank you @haase-fabian and sorry it took me so long to merge this.

Created at 9 hours ago

Fix: keep existing formatted value

bug #5351 Fix: keep existing formatted value (haase-fabian)

This PR was squashed before being merged into the 4.x branch.

Discussion

Fix: keep existing formatted value

This PR allows for overriding the formattedValue via Field::setFormattedValue.

In my application I used something like this:

        yield CollectionField::new('foo')
            ->setFormattedValue("bar");

However it wasn't respected and I still got only the count of items in the datatable on index page.

~~This PR also sets the formattedValue, when the fields value was set manually. I don't think it is desired to not set the formattedValue at least equal to the value itself, even though the value was manually provided.~~

I also added a test case äquivilent to those for the Fields. It feels a bit weird to use AbstractFieldTest for a Configurator, however the necessary functionality was provided through set class.

Commits

2a397fe8 Fix: keep existing formatted value

Created at 9 hours ago
pull request closed
Fix: keep existing formatted value

This PR allows for overriding the formattedValue via Field::setFormattedValue.

In my application I used something like this:

        yield CollectionField::new('foo')
            ->setFormattedValue("bar");

However it wasn't respected and I still got only the count of items in the datatable on index page.

~~This PR also sets the formattedValue, when the fields value was set manually. I don't think it is desired to not set the formattedValue at least equal to the value itself, even though the value was manually provided.~~

I also added a test case äquivilent to those for the Fields. It feels a bit weird to use AbstractFieldTest for a Configurator, however the necessary functionality was provided through set class.

Created at 9 hours ago

Fix: keep existing formatted value

bug #5351 Fix: keep existing formatted value (haase-fabian)

This PR was squashed before being merged into the 4.x branch.

Discussion

Fix: keep existing formatted value

This PR allows for overriding the formattedValue via Field::setFormattedValue.

In my application I used something like this:

        yield CollectionField::new('foo')
            ->setFormattedValue("bar");

However it wasn't respected and I still got only the count of items in the datatable on index page.

~~This PR also sets the formattedValue, when the fields value was set manually. I don't think it is desired to not set the formattedValue at least equal to the value itself, even though the value was manually provided.~~

I also added a test case äquivilent to those for the Fields. It feels a bit weird to use AbstractFieldTest for a Configurator, however the necessary functionality was provided through set class.

Commits

2a397fe8 Fix: keep existing formatted value

Created at 9 hours ago

Fix: keep existing formatted value

Created at 9 hours ago
Suggestion: setEmptyData() method in FieldTrait

According to the setRequired method which already exists, it would be nice to have a shortcut for the empty_data form option as well.

Almost always, when I use ->setRequired(false) I need also need to define the empty_data option, to avoid errors like

Expected argument of type "string", "null" given at property path "xyz".

Alternativley or additionally you could extend the setRequired signature by a second parameter, defining the empty_data option. Because required and empty_data are related.

Created at 9 hours ago
issue comment
Suggestion: setEmptyData() method in FieldTrait

Fixed in #5154.

Created at 9 hours ago
issue comment
Add setEmptyData method to FieldTrait

Thanks Armin!

Created at 10 hours ago

Add setEmptyData method to FieldTrait

Relates: #5153

feature #5154 Add setEmptyData method to FieldTrait (a-r-m-i-n)

This PR was merged into the 4.x branch.

Discussion

Add setEmptyData method to FieldTrait

Relates: #5153

Commits

33ca8f11 Add setEmptyData method to FieldTrait

Add the docs for the new method/option

Created at 10 hours ago
pull request closed
Add setEmptyData method to FieldTrait

Relates: #5153

Created at 10 hours ago

Add setEmptyData method to FieldTrait

Relates: #5153

feature #5154 Add setEmptyData method to FieldTrait (a-r-m-i-n)

This PR was merged into the 4.x branch.

Discussion

Add setEmptyData method to FieldTrait

Relates: #5153

Commits

33ca8f11 Add setEmptyData method to FieldTrait

Add the docs for the new method/option

Created at 10 hours ago
pull request closed
ID Field as clickable link to open detail action

ID Field as clickable link to open detail action.

Created at 10 hours ago
issue comment
ID Field as clickable link to open detail action

Let's close this one in favor of a more generic solution like the one proposed in #5331. Thanks.

Created at 10 hours ago

fix #5379

minor #5380 fix #5379 (InformatiqueProg)

This PR was merged into the 4.x branch.

Discussion

fix #5379

Commits

cada5a2e fix #5379

Created at 10 hours ago
pull request closed
fix #5379
Created at 10 hours ago
readonly input css styles are never applied

readonly input css styles are never applied, because .form-widget is missing from selector

.form-widget input.form-control style always overload .form-control[readonly] definition

Created at 10 hours ago

fix #5379

minor #5380 fix #5379 (InformatiqueProg)

This PR was merged into the 4.x branch.

Discussion

fix #5379

Commits

cada5a2e fix #5379

Created at 10 hours ago