Skip to content
Snippets Groups Projects
Commit 910c18c9 authored by Mukola Lyahovich's avatar Mukola Lyahovich Committed by Eli Stone
Browse files

Issue #3390269 by rznasa: Per Language checkbox not working

parent 1b81b622
No related branches found
No related tags found
No related merge requests found
......@@ -583,10 +583,9 @@ function unique_field_ajax_validate_unique($element, FormStateInterface $form_st
$entity = current($form_state->get('media'));
}
// If !isset lang_code set it to 0.
$langcode = (
!empty($form_state->getValues()['langcode'][0]['value']) &&
$form_state->getValues()['langcode'][0]['value']) ?
$form_state->getValues()['langcode'][0]['value'] : '0';
$langcode = (!empty($form_state->getValues()['langcode'][0]['value']) && $form_state->getValues()['langcode'][0]['value'])
? $form_state->getValues()['langcode'][0]['value']
: $entity->language()->getId();
$field_name = $element['#unique_field_ajax_settings']['field_name'];
if ($object instanceof FileUploadForm) {
......
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