From 8d4fae49579c1403e458e00867fb6a018375269b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 1 Sep 2020 10:29:46 +0200 Subject: [PATCH] do not hide "matches" and "does not match" checkers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - they show up previously with / typed – end user needs to know about it - inconsistent with some other fields, that show it directly Signed-off-by: Arthur Schiwon --- apps/workflowengine/src/components/Checks/file.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/workflowengine/src/components/Checks/file.js b/apps/workflowengine/src/components/Checks/file.js index ee6a476a3a1d2..26c246be591b2 100644 --- a/apps/workflowengine/src/components/Checks/file.js +++ b/apps/workflowengine/src/components/Checks/file.js @@ -20,18 +20,14 @@ * */ -import { stringValidator, validateIPv4, validateIPv6 } from './../../helpers/validators' +import { stringValidator, validateIPv4, validateIPv6 } from '../../helpers/validators' import FileMimeType from './FileMimeType' import FileSystemTag from './FileSystemTag' -const stringOrRegexOperators = (check) => { - if (check.value.startsWith('/')) { - return [ - { operator: 'matches', name: t('workflowengine', 'matches') }, - { operator: '!matches', name: t('workflowengine', 'does not match') }, - ] - } +const stringOrRegexOperators = () => { return [ + { operator: 'matches', name: t('workflowengine', 'matches') }, + { operator: '!matches', name: t('workflowengine', 'does not match') }, { operator: 'is', name: t('workflowengine', 'is') }, { operator: '!is', name: t('workflowengine', 'is not') }, ]