Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a generic voter for editable table fields #4709

Merged
merged 23 commits into from Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADE.md
Expand Up @@ -2,6 +2,11 @@

## Version 4.* to 5.0

### DCA "exclude" fields

The `exclude` property on DCA fields is no longer initialized when loading a back end module. Make sure to check for
`ContaoCorePermission::CAN_EDIT_FIELD_OF_TABLE` to know if a field should be available to a user.

### checkCredentials hook

The `checkCredentials` hook has been removed. Use the `CheckPassportEvent` instead.
Expand Down
12 changes: 0 additions & 12 deletions calendar-bundle/src/Resources/contao/dca/tl_calendar.php
Expand Up @@ -155,15 +155,13 @@
),
'title' => array
(
'exclude' => true,
'search' => true,
'inputType' => 'text',
'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'jumpTo' => array
(
'exclude' => true,
'inputType' => 'pageTree',
'foreignKey' => 'tl_page.title',
'eval' => array('mandatory'=>true, 'fieldType'=>'radio', 'tl_class'=>'clr'),
Expand All @@ -172,15 +170,13 @@
),
'protected' => array
(
'exclude' => true,
'filter' => true,
'inputType' => 'checkbox',
'eval' => array('submitOnChange'=>true),
'sql' => array('type' => 'boolean', 'default' => false)
),
'groups' => array
(
'exclude' => true,
'inputType' => 'checkbox',
'foreignKey' => 'tl_member_group.name',
'eval' => array('mandatory'=>true, 'multiple'=>true),
Expand All @@ -189,15 +185,13 @@
),
'allowComments' => array
(
'exclude' => true,
'filter' => true,
'inputType' => 'checkbox',
'eval' => array('submitOnChange'=>true),
'sql' => array('type' => 'boolean', 'default' => false)
),
'notify' => array
(
'exclude' => true,
'inputType' => 'select',
'options' => array('notify_admin', 'notify_author', 'notify_both'),
'eval' => array('tl_class'=>'w50'),
Expand All @@ -206,7 +200,6 @@
),
'sortOrder' => array
(
'exclude' => true,
'inputType' => 'select',
'options' => array('ascending', 'descending'),
'reference' => &$GLOBALS['TL_LANG']['MSC'],
Expand All @@ -215,35 +208,30 @@
),
'perPage' => array
(
'exclude' => true,
'inputType' => 'text',
'eval' => array('rgxp'=>'natural', 'tl_class'=>'w50'),
'sql' => "smallint(5) unsigned NOT NULL default 0"
),
'moderate' => array
(
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50'),
'sql' => array('type' => 'boolean', 'default' => false)
),
'bbcode' => array
(
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50'),
'sql' => array('type' => 'boolean', 'default' => false)
),
'requireLogin' => array
(
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50'),
'sql' => array('type' => 'boolean', 'default' => false)
),
'disableCaptcha' => array
(
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50'),
'sql' => array('type' => 'boolean', 'default' => false)
Expand Down