Skip to content
Snippets Groups Projects
Commit 8010dd19 authored by Benjamin Melançon's avatar Benjamin Melançon
Browse files

Issue #3470026 by mlncn: Make difference between selecting existing and...

Issue #3470026 by mlncn: Make difference between selecting existing and creating a new entity as clear as possible
parent 16ad9239
No related branches found
Tags 8.x-1.21
No related merge requests found
......@@ -395,6 +395,8 @@ class InlineEntityFormComplexOpen extends InlineEntityFormComplex {
unset($element['form']['entity_id']['#title']);
unset($element['form']['entity_id']['#required']);
$element['form']['#process'][] = [get_class($this), 'hideCancel'];
$element['form']['#title'] = $this->t('Select existing @type_singular', ['@type_singular' => $labels['singular']]);
$element['form']['actions']['ief_reference_save']['#value'] = $this->t('Reference existing @type_singular', ['@type_singular' => $labels['singular']]);
$key = array_search('inline_entity_form_reference_form_submit', $element['form']['#ief_element_submit']);
if ($key !== FALSE) {
$element['form']['#ief_element_submit'][$key] = [get_class($this), 'reference_form_submit'];
......@@ -451,7 +453,7 @@ class InlineEntityFormComplexOpen extends InlineEntityFormComplex {
* Change "Add new.." text to "Create new..";
*/
$element['actions']['#type'] = 'fieldset';
$element['actions']['#title'] = $this->t('Create new @type_singular', ['@type_singular' => $labels['singular']]);
unset($element['actions']['#title']); // = $this->t('Create new @type_singular', ['@type_singular' => $labels['singular']]);
$element['actions']['ief_add']['#value'] = $this->t('Create new @type_singular', ['@type_singular' => $labels['singular']]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment