Skip to content

Commit

Permalink
allow numbers for ids and names, check for existing array-keys to pre…
Browse files Browse the repository at this point in the history
…vent error-messages
  • Loading branch information
mreiss committed Nov 14, 2024
1 parent 081526b commit 988f604
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/WorkflowGui/Controller/WorkflowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ protected function sanitizeConfiguration($configuration): array

if (isset($transitionConfig['options']['notes']['additionalFields'])) {
foreach ($transitionConfig['options']['notes']['additionalFields'] as &$additionalField) {
if (!$additionalField['setterFn']) {
if (isset($additionalField['setterFn']) && !$additionalField['setterFn']) {
unset ($additionalField['setterFn']);
}

if (!$additionalField['title']) {
if (isset($additionalField['title']) && !$additionalField['title']) {
unset ($additionalField['title']);
}

if (!$additionalField['required']) {
if (isset($additionalField['required']) && !$additionalField['required']) {
unset ($additionalField['required']);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pimcore.plugin.workflow.global_action = Class.create({
value: globalAction.getId(),
fieldLabel: t('workflow_global_action_id'),
allowBlank: false,
regex: /^[a-zA-Z_]+$/
regex: /^[a-zA-Z_0-9]+$/
},
{
xtype: 'textfield',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ pimcore.plugin.workflow.item = Class.create({
value: this.id,
fieldLabel: t('workflow_name'),
allowBlank: false,
regex: /^[a-zA-Z_]+$/
regex: /^[a-zA-Z_0-9]+$/
},
{
xtype: 'checkbox',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pimcore.plugin.workflow.place = Class.create({
value: place.getId(),
fieldLabel: t('workflow_place_id'),
allowBlank: false,
regex: /^[a-zA-Z_]+$/
regex: /^[a-zA-Z_0-9]+$/
},
{
xtype: 'textfield',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pimcore.plugin.workflow.transition = Class.create({
value: transition.getId(),
fieldLabel: t('workflow_transition_id'),
allowBlank: false,
regex: /^[a-zA-Z_]+$/
regex: /^[a-zA-Z_0-9]+$/
},

{
Expand Down

0 comments on commit 988f604

Please sign in to comment.