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

[TASK] Merge properties to selectsingle #1139

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ fieldWizard
DefaultLanguageDifferences
LocalizationStateSelector
OtherLanguageContent
SelectIcons

This file was deleted.

3 changes: 1 addition & 2 deletions Documentation/ColumnsConfig/CommonProperties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ tablenames

uid (auto-incremented and PRIMARY KEY)
May be used if you need the "multiple" feature (which allows the same record to be references multiple times
in the box. See :ref:`MM_hasUidField <columns-select-properties-mm-hasuidfield>` for type='select' and
:ref:`MM_hasUidField <columns-group-properties-mm-hasuidfield>` for type='group' fields.
in the box. See :ref:`MM_hasUidField <columns-group-properties-mm-hasuidfield>` for type='group' fields.

further fields
May exist, in particular if :ref:`MM_match_fields <columns-select-properties-mm-match-fields>` /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ appearance - selectCheckBox
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: array
:Scope: Display
:RenderType: :ref:`selectCheckBox <columns-select-rendertype-selectCheckBox>`

Options for refining the appearance of `selectCheckBox` fields.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ itemGroups
Item groups can also be defined for items in
:ref:`foreign tables <columns-select-properties-foreign-table-item-group>`.

API methods
===========

.. _columns-select-properties-item-groups-api:

Item group API methods
======================

.. _columns-select-properties-item-groups-api-custom:

Adding custom select item groups
--------------------------------
Expand Down Expand Up @@ -61,6 +66,8 @@ original TCA definition without using the API method. Use the API within
:file:`TCA/Configuration/Overrides/` files to extend an existing TCA select
field with grouping.

.. _columns-select-properties-item-groups-api-attach:

Attaching select items to item groups
-------------------------------------

Expand Down
22 changes: 0 additions & 22 deletions Documentation/ColumnsConfig/Type/Select/Properties/Items.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,6 @@ items
Examples
========

.. _tca_example_select_single_1:

Simple items definition with label and value
--------------------------------------------

.. include:: /Images/Rst/SelectSingle1.rst.txt

.. include:: /CodeSnippets/SelectSingle1.rst.txt


.. _tca_example_select_single_4:

Items definition with label, value and icon
-------------------------------------------

A more complex example could be this (includes icons):

.. include:: /Images/Rst/SelectSingle4.rst.txt

.. include:: /CodeSnippets/SelectSingle4.rst.txt


Select checkbox field with icons and descriptions
-------------------------------------------------

Expand Down
13 changes: 0 additions & 13 deletions Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ MM
in the :ref:`MM common property description <tca_property_MM>`.


Examples
========

.. _tca_example_select_single_15:

Select field with foreign table via MM table
--------------------------------------------

.. include:: /Images/Rst/SelectSingle15.rst.txt

.. include:: /CodeSnippets/SelectSingle15.rst.txt


Related configurations
======================

Expand Down
34 changes: 0 additions & 34 deletions Documentation/ColumnsConfig/Type/Select/Single/Examples.rst

This file was deleted.

117 changes: 110 additions & 7 deletions Documentation/ColumnsConfig/Type/Select/Single/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,123 @@ selectSingle
Single select fields display a select field from which only one value can be
chosen.

.. include:: /Images/Rst/SelectSingle12.rst.txt

The renderType selectSingle creates a drop-down box with items to select a
single value. Only if :ref:`size <columns-select-properties-size>` is set to a
single value. Only if :confval:`select-single-size` is set to a
value greater than one, a box is rendered containing all selectable elements
from which one can be chosen.

.. contents:: Table of contents

.. _columns-select-rendertype-selectSingle-examples:

Examples for select fields with renderType `selectSingle`
=========================================================

.. _tca_example_select_single_3:

Simple select drop down with static and database values
-------------------------------------------------------

.. include:: /Images/Rst/SelectSingle3.rst.txt

.. include:: /CodeSnippets/SelectSingle3.rst.txt


.. _tca_example_select_single_12:

Select foreign rows with icons
------------------------------

.. include:: /Images/Rst/SelectSingle12.rst.txt

.. include:: /CodeSnippets/SelectSingle12.rst.txt


.. _tca_example_select_single_10:

Select a single value from a list of elements
---------------------------------------------

.. include:: /Images/Rst/SelectSingle10.rst.txt

.. toctree::
:titlesonly:
.. include:: /CodeSnippets/SelectSingle10.rst.txt


.. _columns-select-properties:

Properties of the TCA column type `select` with renderType `selectSingle`
=========================================================================

.. confval-menu::
:display: table
:type:
:Scope:

.. include:: _Properties/_AllowNonIdValues.rst.txt
:show-buttons:

.. include:: _Properties/_AuthMode.rst.txt
:show-buttons:

.. include:: _Properties/_AuthModeEnforce.rst.txt
:show-buttons:

.. include:: _Properties/_AutoSizeMax.rst.txt
:show-buttons:

.. include:: _Properties/_Behaviour.rst.txt
:show-buttons:

.. include:: _Properties/_Default.rst.txt
:show-buttons:

.. include:: _Properties/_DisableNonMatchingValueElement.rst.txt
:show-buttons:

.. include:: _Properties/_FieldControl.rst.txt
:show-buttons:

.. include:: _Properties/_FieldInformation.rst.txt
:show-buttons:

.. include:: _Properties/_FieldWizard.rst.txt
:show-buttons:

.. include:: _Properties/_FileFolderConfig.rst.txt
:show-buttons:

.. include:: _Properties/_ForeignTable.rst.txt
:show-buttons:

.. include:: _Properties/_ForeignTablePrefix.rst.txt
:show-buttons:

.. include:: _Properties/_ForeignTableWhere.rst.txt
:show-buttons:

.. include:: _Properties/_ItemGroups.rst.txt
:show-buttons:

.. include:: _Properties/_Items.rst.txt
:show-buttons:

.. include:: _Properties/_ItemsProcFunc.rst.txt
:show-buttons:

.. include:: _Properties/_Maxitems.rst.txt
:show-buttons:

.. include:: _Properties/_Minitems.rst.txt
:show-buttons:

Examples
Properties
.. include:: _Properties/_Mm.rst.txt
:show-buttons:

.. include:: _Properties/_Multiple.rst.txt
:show-buttons:

.. include:: _Properties/_ReadOnly.rst.txt
:show-buttons:

.. include:: _Properties/_Size.rst.txt
:show-buttons:
73 changes: 0 additions & 73 deletions Documentation/ColumnsConfig/Type/Select/Single/Properties.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. confval:: allowNonIdValues
:name: select-single-allowNonIdValues
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: boolean
:Scope: Proc.
:RenderType: all

Only useful if :confval:`select-single-foreign-table` is enabled.

If set, then values which are not integer ids will be allowed. May be needed
if you use itemsProcFunc or just enter additional items in the items array
to produce some string-value elements for the list.

.. note::
If you mix non-database relations with database relations like this, DO
NOT use integers for values and DO NOT use "\_" (underscore) in values
either! Will not work if you also use "MM" relations!
Loading
Loading