Issue #2894499 by amateescu, Manuel Garcia, xjm: Rename 'Editorial workflow' to 'Editorial'
parent
e7d43505b2
commit
b3aa553406
|
@ -4,7 +4,7 @@ dependencies:
|
||||||
module:
|
module:
|
||||||
- content_moderation
|
- content_moderation
|
||||||
id: editorial
|
id: editorial
|
||||||
label: 'Editorial workflow'
|
label: 'Editorial'
|
||||||
type: content_moderation
|
type: content_moderation
|
||||||
type_settings:
|
type_settings:
|
||||||
states:
|
states:
|
||||||
|
|
|
@ -15,6 +15,6 @@ use Symfony\Component\Validator\Constraint;
|
||||||
class ModerationStateConstraint extends Constraint {
|
class ModerationStateConstraint extends Constraint {
|
||||||
|
|
||||||
public $message = 'Invalid state transition from %from to %to';
|
public $message = 'Invalid state transition from %from to %to';
|
||||||
public $invalidStateMessage = 'State %state does not exist on %workflow';
|
public $invalidStateMessage = 'State %state does not exist on %workflow workflow';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ class ContentModerationWorkflowConfigTest extends KernelTestBase {
|
||||||
$error_log = $this->configImporter->getErrors();
|
$error_log = $this->configImporter->getErrors();
|
||||||
$expected = [
|
$expected = [
|
||||||
'The moderation state Test two is being used, but is not in the source storage.',
|
'The moderation state Test two is being used, but is not in the source storage.',
|
||||||
'The workflow Editorial workflow is being used, and cannot be deleted.',
|
'The workflow Editorial is being used, and cannot be deleted.',
|
||||||
];
|
];
|
||||||
$this->assertEqual($expected, $error_log);
|
$this->assertEqual($expected, $error_log);
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ class EntityStateChangeValidationTest extends KernelTestBase {
|
||||||
$violations = $node->validate();
|
$violations = $node->validate();
|
||||||
|
|
||||||
$this->assertCount(1, $violations);
|
$this->assertCount(1, $violations);
|
||||||
$this->assertEquals('State <em class="placeholder">invalid_state</em> does not exist on <em class="placeholder">Editorial workflow</em>', $violations->get(0)->getMessage());
|
$this->assertEquals('State <em class="placeholder">invalid_state</em> does not exist on <em class="placeholder">Editorial</em> workflow', $violations->get(0)->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,6 +24,8 @@ class WorkflowEditForm extends EntityForm {
|
||||||
|
|
||||||
/* @var \Drupal\workflows\WorkflowInterface $workflow */
|
/* @var \Drupal\workflows\WorkflowInterface $workflow */
|
||||||
$workflow = $this->entity;
|
$workflow = $this->entity;
|
||||||
|
$form['#title'] = $this->t('Edit %label workflow', ['%label' => $workflow->label()]);
|
||||||
|
|
||||||
$form['label'] = [
|
$form['label'] = [
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => $this->t('Label'),
|
'#title' => $this->t('Label'),
|
||||||
|
|
Loading…
Reference in New Issue