[TASK] EXT:form - Make characterList from trim filter not mandatory 06/44406/3
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Thu, 5 Nov 2015 14:14:52 +0000 (15:14 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 5 Nov 2015 21:11:52 +0000 (22:11 +0100)
Make the "characterList" property from the trim filter not required.
Allow zeros in the characterList.

Resolves: #70221
Releases: master
Change-Id: I9f06ce4915b2d061cf7a063e0aea3d02c31594e2
Reviewed-on: https://review.typo3.org/44406
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/form/Classes/Domain/Filter/TrimFilter.php
typo3/sysext/form/Resources/Public/JavaScript/Wizard/Viewport/Left/Options/Forms/Filters/Filter.js

index f39f7c0..c5cc67f 100644 (file)
@@ -58,7 +58,10 @@ class TrimFilter extends AbstractFilter implements FilterInterface
      */
     public function filter($value)
     {
-        if ($this->characterList === null) {
+        if (
+            $this->characterList === null
+            || $this->characterList === ''
+        ) {
             return trim((string)$value);
         } else {
             return trim((string)$value, $this->characterList);
index 713c21d..49e8dd3 100644 (file)
@@ -120,7 +120,7 @@ TYPO3.Form.Wizard.Viewport.Left.Options.Forms.Filters.Filter = Ext.extend(Ext.Fo
                                        formItems.push({
                                                fieldLabel: TYPO3.l10n.localize('filters_properties_characterlist'),
                                                name: 'characterList',
-                                               allowBlank: false,
+                                               allowBlank: true,
                                                listeners: {
                                                        'triggerclick': {
                                                                scope: this,