From 6dccd603d7bca7d1937cec5967281984072da41b Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 31 Aug 2023 18:00:54 +0200 Subject: [PATCH] add boolean field new options --- docs/crud/configuration.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/crud/configuration.md b/docs/crud/configuration.md index d468dd8..32f981e 100644 --- a/docs/crud/configuration.md +++ b/docs/crud/configuration.md @@ -209,10 +209,14 @@ $configuration->setField('index', 'My field', TextField::class, [ `App\Core\Crud\Field\BooleanField` -| Option | Type | Default | Description | -| ------ | ---- | ------- | ----------- | -| `view` | `string` | `@Core/admin/crud/field/boolean.html.twig` | The templated rendered | -| `display` | `string` | `toggle` | Type of render (`toggle` or `checkbox`) | +| Option | Type | Default | Description | +| ------ | ---- | ------- | ----------- | +| `view` | `string` | `@Core/admin/crud/field/boolean.html.twig` | The templated rendered | +| `display` | `string` | `toggle` | Type of render (`toggle` or `checkbox`) | +| `checkbox_class_when_true` | `string` | `fa-check-square` | HTML class added when the value is `true` and display is `checkbox` | +| `checkbox_class_when_false` | `string` | `fa-square` | HTML class added when the value is `false` and display is `checkbox` | +| `toggle_class_when_true` | `string` | `bg-success` | HTML class added when the value is `true` and display is `toggle` | +| `toggle_class_when_false` | `string` | `bg-secondary` | HTML class added when the value is `false` and display is `toggle` | ## setMaxPerPage