Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
f2d3e009
Commit
f2d3e009
authored
Nov 30, 2019
by
Carsten Rose
Browse files
Merge branch 'F9666ExtraButtonInfoMinWidth' into 'master'
Implements #9666: min-width for extraButtonInfo See merge request
!213
parents
65c70895
5d2a1bbb
Pipeline
#2828
passed with stages
in 2 minutes and 46 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Documentation/Manual.rst
View file @
f2d3e009
...
...
@@ -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_ |
...
...
@@ -3128,6 +3130,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, | | |
...
...
@@ -3188,9 +3192,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
`_.
|
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
...
...
@@ -3257,6 +3261,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 @
f2d3e009
...
...
@@ -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 @
f2d3e009
...
...
@@ -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 @
f2d3e009
...
...
@@ -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
Markdown
is supported
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