Commit 48dc14f9 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4386 Fuer GRC: Optional Info Button bei 'input' wie bei 'textarea' -...

#4386 Fuer GRC: Optional Info Button bei 'input' wie bei 'textarea' - EXTRA_BUTTON_INFO_POSITION=below
Manual.rst: update doc for EXTRA_BUTTON_INFO_POSITION.
HelperFormElement.php: honor setting of EXTRA_BUTTON_INFO_POSITION.
parent 4fee1995
......@@ -302,6 +302,8 @@ config.qfq.ini
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
|GFX_EXTRA_BUTTON_INFO_BELOW | <img src="info.png"> | Image for `extraButtonInfo`_ (below) |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
|EXTRA_BUTTON_INFO_POSITION | SYSTEM_EXTRA_BUTTON_INFO_POSITION=below | 'auto' (default) or 'below'. See `extraButtonInfo`_ |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| SAVE_BUTTON_TEXT | SAVE_BUTTON_TEXT = | Default text on the form save button. Typically none. |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| SAVE_BUTTON_TOOLTIP | SAVE_BUTTON_TOOLTIP = save | Default tooltip on the form save button. |
......@@ -439,6 +441,8 @@ Example: *typo3conf/config.qfq.ini*
;FORM_LANGUAGE_A_ID = 1
;FORM_LANGUAGE_A_LABEL = english
;EXTRA_BUTTON_INFO_POSITION = auto | below
.. _`CustomVariables`:
Custom variables
......@@ -2203,7 +2207,7 @@ See also at specific *FormElement* definitions.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| extraButtonPassword | none | No value. Show an 'eye' on the right side of the input element. See `extraButtonPassword`_ |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| extraButtonInfo | string | Text. Show a 'i' on the right side of the input element. See `extraButtonInfo`_ |
| extraButtonInfo | string | Text. Show an 'i' on the right side of the input element. See `extraButtonInfo`_ |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| autofocus | string | See `input-option-autofocus`_ |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
......@@ -2407,13 +2411,14 @@ extraButtonInfo
;;;;;;;;;;;;;;;
* The user has to click on the `info` button/icon to see an additional message.
* After Form load, the information message is hided.
* After Form load, the information message is hidden.
* The value of this parameter is the text shown.
* Shows an `info` button/icon, depending of the type:
* Shows an `info` button/icon, depending of EXTRA_BUTTON_INFO_POSITION in `config.qfq.ini`_ or `FormElement` type:
* on the right side of an input element for type `text`, `date`, `time` or `datetime`,
* below the FormElement for all other types.
.. _`input-checkbox`:
Type: checkbox
......
......@@ -1032,10 +1032,9 @@ abstract class AbstractBuildForm {
if ($formElement[FE_HIDE_ZERO] != '0' && $value == '0') {
$value = '';
}
// $formElement = HelperFormElement::prepareExtraButton($formElement, !$flagTextarea, $extraButton);
$formElement = HelperFormElement::prepareExtraButton($formElement, !$flagTextarea);
if ($flagTextarea) {
// <textarea>
$htmlTag = '<textarea';
$attribute .= Support::doAttribute('cols', $colsRows[0]);
......
......@@ -410,6 +410,9 @@ const GET_EXTRA_LENGTH_TOKEN = '_';
const SYSTEM_GFX_EXTRA_BUTTON_INFO_INLINE = 'GFX_EXTRA_BUTTON_INFO_INLINE';
const SYSTEM_GFX_EXTRA_BUTTON_INFO_BELOW = 'GFX_EXTRA_BUTTON_INFO_BELOW';
const SYSTEM_EXTRA_BUTTON_INFO_POSITION = 'EXTRA_BUTTON_INFO_POSITION';
const SYSTEM_EXTRA_BUTTON_INFO_POSITION_AUTO = 'auto';
const SYSTEM_EXTRA_BUTTON_INFO_POSITION_BELOW = 'below';
const SYSTEM_SAVE_BUTTON_TEXT = 'SAVE_BUTTON_TEXT';
const SYSTEM_SAVE_BUTTON_TOOLTIP = 'SAVE_BUTTON_TOOLTIP';
......
......@@ -267,6 +267,10 @@ class HelperFormElement {
$infoSymbolInside = $store->getVar(SYSTEM_GFX_EXTRA_BUTTON_INFO_INLINE, STORE_SYSTEM);
$infoSymbolOutside = $store->getVar(SYSTEM_GFX_EXTRA_BUTTON_INFO_BELOW, STORE_SYSTEM);
if (SYSTEM_EXTRA_BUTTON_INFO_POSITION_BELOW == $store->getVar(SYSTEM_EXTRA_BUTTON_INFO_POSITION, STORE_SYSTEM)) {
$showInline = false;
}
$extraButton = '';
$id = $formElement[FE_HTML_ID];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment