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 {
*/
protected function defineDefaultProperties() {
return [
'multiple' => FALSE,
static::FIELD_TYPE => '',
static::FIELD_DATA => '',
'multiple' => FALSE,
static::FIELD_TYPE => '',
static::FIELD_DATA => '',
static::FIELD_EVENT_TYPE => static::EVENT_TYPE_NO_ERROR,
] + parent::defineDefaultProperties();
......@@ -77,7 +77,7 @@ class WebformTriggerApi extends WebformElementBase {
protected function defineTranslatableProperties() {
return array_merge(
parent::defineTranslatableProperties(),
['null_label']
['null_label', static::FIELD_DATA],
);
}
......@@ -114,11 +114,11 @@ class WebformTriggerApi extends WebformElementBase {
'#title' => $this->t('Event type'),
'#default_value' => '',
'#required' => TRUE,
'#options' => [
'#options' => [
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;
......
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