Task #63432
closedUnify clearable input fields
100%
Description
There are three places in the core
where clearables (cleaning the content
of a input field with an X at the end)
are used.
- FormEngine
- Documentation
- Extension Manager
For EXT:documentation a hand-written
jQuery plugin was added called
"jquery.clearable". This was also used in
Extension Manager. For FormEngine
there was a inline JS code changing
CSS classes on hover.
In recent changes the clearable logic
for FormEngine broke. The proposed
change now unifies the code.
1. The clearable plugin was solved
so it is not called multiple times
on the same input field, and also
takes into account if the input
field is used like in FormEngine
where "hidden" fields are used.
2. The FormEngine RequireJS module
is now cleaned so it has a method
"TYPO3.FormEngine.reinitialize" which
can be used from outside the module
for AJAX requests like IRRE.
3. The FormEngine now uses the clearable
plugin initialized via the new function
instead of its own inlineJS logic,
and removes the old broken logic.
4. The corresponding CSS is now included
in the LESS file instead of a separate file
with a few lines.