Skip to content
GitLab
Menu
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
5d2a1bbb
Commit
5d2a1bbb
authored
Nov 30, 2019
by
Carsten Rose
Browse files
Implements #9666: min-width for extraButtonInfo
parent
f9700c9e
Pipeline
#2826
passed with stages
in 2 minutes and 35 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/Manual.rst
View file @
5d2a1bbb
...
...
@@ -2600,6 +2600,8 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| extraButtonInfoClass | string | Overwrite default from configuration_ |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| extraButtonInfoMinWidth | string | See extraButtonInfo_ |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| fillStoreVar | string | Fill the STORE_VAR with custom values. See `STORE_VARS`_. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| showIdInFormTitle | string | Overwrite default from configuration_ |
...
...
@@ -3086,6 +3088,8 @@ See also at specific *FormElement* definitions.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| extraButtonInfoClass | string | By default empty. Specify any class to be assigned to wrap extraButtonInfo |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| extraButtonInfoMinWidth| string | See `extraButtonInfo`_ |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| editor-plugins, | string | See `input-editor`_ |
| editor-toolbar, | | |
| editor-statusbar, | | |
...
...
@@ -3146,9 +3150,9 @@ See also at specific *FormElement* definitions.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| dataReference | string | Optional. See `applicationTest`_ |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| requiredPosition | int | See requiredPosition
_ .
|
| requiredPosition | int | See
`
requiredPosition
`_.
|
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth
.
|
| minWidth | int | See
`
checkboxRadioMinWidth
`_.
|
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
...
...
@@ -3215,6 +3219,7 @@ extraButtonInfo
* `below`: below the FormElement for all types.
* `extraButtonInfoMinWidth`: default is 250 and defines a minimal width.
* For `FormElement` with mode `below`, a `span` element with the given class in `extraButtonInfoClass` (FE, F, configuration_)
will be applied. E.g. this might be `pull-right` to align the `info` button/icon on the right side below the input element.
...
...
extension/Classes/Core/Constants.php
View file @
5d2a1bbb
...
...
@@ -1246,6 +1246,8 @@ const FE_INPUT_EXTRA_BUTTON_LOCK = 'extraButtonLock';
const
FE_INPUT_EXTRA_BUTTON_PASSWORD
=
'extraButtonPassword'
;
const
FE_INPUT_EXTRA_BUTTON_INFO
=
'extraButtonInfo'
;
const
FE_INPUT_EXTRA_BUTTON_INFO_CLASS
=
SYSTEM_EXTRA_BUTTON_INFO_CLASS
;
const
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH
=
'extraButtonMinWidth'
;
const
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH_DEFAULT
=
'250'
;
const
FE_INPUT_AUTOCOMPLETE
=
'autocomplete'
;
const
FE_TMP_EXTRA_BUTTON_HTML
=
'_extraButtonHtml'
;
// will be filled on the fly during building extrabutton
const
FE_CHECKBOX_CHECKED
=
'checked'
;
...
...
extension/Classes/Core/Helper/HelperFormElement.php
View file @
5d2a1bbb
...
...
@@ -291,6 +291,7 @@ class HelperFormElement {
}
Support
::
setIfNotSet
(
$feSpecNative
[
$key
],
F_FE_REQUIRED_POSITION
,
$formSpec
[
F_FE_REQUIRED_POSITION
]);
Support
::
setIfNotSet
(
$feSpecNative
[
$key
],
F_FE_MIN_WIDTH
,
$formSpec
[
F_FE_MIN_WIDTH
]);
Support
::
setIfNotSet
(
$feSpecNative
[
$key
],
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH
,
$formSpec
[
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH
]);
}
return
$feSpecNative
;
...
...
@@ -377,8 +378,11 @@ class HelperFormElement {
}
$formElement
[
FE_TMP_EXTRA_BUTTON_HTML
]
=
''
;
$minWidth
=
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH
]
??
''
;
$minWidth
.
=
'px'
;
// INFO: $showinline =- TRUE ('input' elemente)
// INFO: $showinline =- TRUE ('input' elements)
if
(
isset
(
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
])
&&
$showInline
)
{
$extraButton
.
=
<<<EOF
<button type="button" class="btn btn-info" onclick="$('#$id-extra-info').slideToggle('swing')">
...
...
@@ -388,7 +392,7 @@ EOF;
$value
=
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
];
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
]
=
<<<EOF
<div class="alert alert-info" id="$id-extra-info" style="display: none;">
<div class="alert alert-info" id="$id-extra-info" style="display: none;
min-width: $minWidth;
">
<p>$value</p>
</div>
EOF;
...
...
@@ -400,7 +404,7 @@ EOF;
$arr
=
explode
(
' '
,
$infoSymbolOutside
,
2
);
$infoSymbolOutside
=
$arr
[
0
]
.
$js
.
$arr
[
1
];
// INFO: $showinline == FALSE (e.g. 'textarea' element
e
)
// INFO: $showinline == FALSE (e.g. 'textarea' element
s
)
if
(
isset
(
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
])
&&
!
$showInline
)
{
$class
=
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO_CLASS
];
$extraButton
.
=
<<<EOF
...
...
@@ -409,7 +413,7 @@ EOF;
$value
=
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
];
$formElement
[
FE_INPUT_EXTRA_BUTTON_INFO
]
=
<<<EOF
<div class="alert alert-info" id="$id-extra-info" style="display: none;">
<div class="alert alert-info" id="$id-extra-info" style="display: none;
min-width: $minWidth;
">
<p>$value</p>
</div>
EOF;
...
...
extension/Classes/Core/QuickFormQuery.php
View file @
5d2a1bbb
...
...
@@ -1441,6 +1441,7 @@ class QuickFormQuery {
Support
::
setIfNotSet
(
$formSpec
,
F_FE_REQUIRED_POSITION
,
F_FE_REQUIRED_POSITION_LABEL_RIGHT
);
Support
::
setIfNotSet
(
$formSpec
,
F_MULTI_MSG_NO_RECORD
,
F_MULTI_MSG_NO_RECORD_TEXT
);
Support
::
setIfNotSet
(
$formSpec
,
F_FE_MIN_WIDTH
,
F_FE_MIN_WIDTH_DEFAULT
);
Support
::
setIfNotSet
(
$formSpec
,
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH
,
FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH_DEFAULT
);
// In case there is no F_MODE defined on the form, check if there is one in STORE_SIP.
if
(
$formSpec
[
F_MODE
]
==
''
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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