Commit 9cd7cd5c authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refs #9528 FE.parameter.clearMe

parent ef86b233
Pipeline #5062 passed with stages
in 3 minutes and 39 seconds
......@@ -1334,6 +1334,10 @@ abstract class AbstractBuildForm {
$class = 'form-control';
$elementCharacterCount = '';
if (isset($formElement[FE_INPUT_CLEAR_ME])) {
$class .= ' qfq-clear-me';
}
if ($formElement[FE_MAX_LENGTH] > 0 && $value !== '') {
// crop string only if it's not empty (substr returns false on empty strings)
$value = mb_substr($value, 0, $formElement[FE_MAX_LENGTH]);
......
......@@ -1282,6 +1282,7 @@ 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_CLEAR_ME = 'clearMe';
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';
......
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