Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
414539db
Commit
414539db
authored
Feb 16, 2018
by
Elias Villiger
Browse files
Bug #5285 - Make typeAheadPedantic the default
parent
c4495018
Changes
3
Hide whitespace changes
Inline
Side-by-side
extension/Documentation/Manual.rst
View file @
414539db
...
...
@@ -1497,7 +1497,7 @@ To decide which Parameter should be placed on *Form.parameter* and which on *For
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
| typeAheadLimit | 20 (default) | Result will be limited to this number of entries | x | x | TA |
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
| typeAheadPedantic | typeAheadPedantic
|
Activate
'pedantic' mode -
only valid keys are allowed
| x | x | TA |
| typeAheadPedantic | typeAheadPedantic
=0
|
Turn off
'pedantic' mode -
allow any values (see below)
| x | x | TA |
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
| typeAheadMinLength | 2 (default) | Minimum number of characters before starting the search | x | x | TA |
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
...
...
@@ -1547,14 +1547,17 @@ the user types something.
Pedantic
^^^^^^^^
In case the typed value (technically this is the value of the *id*, latest in the moment when loosing the focus) have
to be a valid (= exist on the LDAP server), the *typeAheadPedantic* mode can be activated.
If the user typed something and that is not a valid *id*, the client (=browser) will delete the input when loosing the focus.
To identify the exact *id*, an additional search filter is necessary: `ypeAheadLdapSearchPrefetch` - see next topic.
The *typeAheadPedantic* mode ensures that the typed value (technically this is the value of the *id*, latest in the moment
when loosing the focus) is valid (= exists on the LDAP server or is defined in `typeAheadSql`).
If the user typed something and that is not a valid *id*, the client (=browser) will delete the input when losing the focus.
To identify the exact *id*, an additional search filter is necessary: `typeAheadLdapSearchPrefetch` - see next topic.
*typeAheadPedantic* is active by default when *typeAheadLdap* or *typeAheadSql* is defined, but can be turned off with
*typeAheadPedantic=0*.
* *Form.parameter* or *FormElement.parameter*:
* *typeAheadPedantic*
* *typeAheadPedantic
=0
*
Prefetch
^^^^^^^^
...
...
extension/qfq/qfq/AbstractBuildForm.php
View file @
414539db
...
...
@@ -1067,7 +1067,7 @@ abstract class AbstractBuildForm {
$attribute
.
=
Support
::
doAttribute
(
DATA_TYPEAHEAD_SIP
,
$dataSip
);
$attribute
.
=
Support
::
doAttribute
(
DATA_TYPEAHEAD_LIMIT
,
$formElement
[
FE_TYPEAHEAD_LIMIT
]);
$attribute
.
=
Support
::
doAttribute
(
DATA_TYPEAHEAD_MINLENGTH
,
$formElement
[
FE_TYPEAHEAD_MINLENGTH
]);
if
(
isset
(
$formElement
[
FE_TYPEAHEAD_PEDANTIC
]))
{
if
(
isset
(
$formElement
[
FE_TYPEAHEAD_PEDANTIC
])
&&
$formElement
[
FE_TYPEAHEAD_PEDANTIC
]
===
'1'
)
{
$attribute
.
=
Support
::
doAttribute
(
DATA_TYPEAHEAD_PEDANTIC
,
'true'
);
}
}
...
...
extension/qfq/qfq/helper/Support.php
View file @
414539db
...
...
@@ -750,6 +750,14 @@ class Support {
$formElement
[
FE_MODE
]
=
self
::
applyFormModeToFormElement
(
$formElement
[
FE_MODE
],
$formSpec
[
F_MODE
]);
}
// set typeAheadPedantic
if
(
isset
(
$formElement
[
FE_TYPEAHEAD_PEDANTIC
])
&&
$formElement
[
FE_TYPEAHEAD_PEDANTIC
]
===
''
)
{
$formElement
[
FE_TYPEAHEAD_PEDANTIC
]
=
'1'
;
// support legacy option of 'typeAheadPedantic' without a value
}
if
(
isset
(
$formElement
[
FE_TYPEAHEAD_LDAP
])
||
isset
(
$formElement
[
FE_TYPEAHEAD_SQL
]))
{
self
::
setIfNotSet
(
$formElement
,
FE_TYPEAHEAD_PEDANTIC
,
'1'
);
}
// Will be used to change dynamicUpdate behaviour
if
(
isset
(
$formElement
[
FE_WRAP_ROW_LABEL_INPUT_NOTE
]))
{
$formElement
[
FE_FLAG_ROW_OPEN_TAG
]
=
Support
::
findInSet
(
'row'
,
$formElement
[
FE_WRAP_ROW_LABEL_INPUT_NOTE
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment