Commit 7b56f1f9 authored by Thomas SECHER's avatar Thomas SECHER
Browse files

Field data translatable

parent eeee5653
...@@ -63,9 +63,9 @@ class WebformTriggerApi extends WebformElementBase { ...@@ -63,9 +63,9 @@ class WebformTriggerApi extends WebformElementBase {
*/ */
protected function defineDefaultProperties() { protected function defineDefaultProperties() {
return [ return [
'multiple' => FALSE, 'multiple' => FALSE,
static::FIELD_TYPE => '', static::FIELD_TYPE => '',
static::FIELD_DATA => '', static::FIELD_DATA => '',
static::FIELD_EVENT_TYPE => static::EVENT_TYPE_NO_ERROR, static::FIELD_EVENT_TYPE => static::EVENT_TYPE_NO_ERROR,
] + parent::defineDefaultProperties(); ] + parent::defineDefaultProperties();
...@@ -77,7 +77,7 @@ class WebformTriggerApi extends WebformElementBase { ...@@ -77,7 +77,7 @@ class WebformTriggerApi extends WebformElementBase {
protected function defineTranslatableProperties() { protected function defineTranslatableProperties() {
return array_merge( return array_merge(
parent::defineTranslatableProperties(), parent::defineTranslatableProperties(),
['null_label'] ['null_label', static::FIELD_DATA],
); );
} }
...@@ -114,11 +114,11 @@ class WebformTriggerApi extends WebformElementBase { ...@@ -114,11 +114,11 @@ class WebformTriggerApi extends WebformElementBase {
'#title' => $this->t('Event type'), '#title' => $this->t('Event type'),
'#default_value' => '', '#default_value' => '',
'#required' => TRUE, '#required' => TRUE,
'#options' => [ '#options' => [
static::EVENT_TYPE_NO_ERROR => $this->t('On valid form only.'), static::EVENT_TYPE_NO_ERROR => $this->t('On valid form only.'),
static::EVENT_TYPE_ERROR => $this->t('On errors only.'), static::EVENT_TYPE_ERROR => $this->t('On errors only.'),
], ],
'#description' => $this->t('The element must be placed at the end of the form part to be efficient.') '#description' => $this->t('The element must be placed at the end of the form part to be efficient.')
]; ];
return $form; return $form;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment