Skip to content
Permalink
Browse files

Allow overriding more settings

  • Loading branch information...
flack committed Apr 9, 2019
1 parent 86bed66 commit 9852891fcdc1af6094e6bf92a234688da30d4dfe
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/midcom/datamanager/extension/type/autocompleteType.php
@@ -139,13 +139,16 @@ public function finishView(FormView $view, FormInterface $form, array $options)
}
}
$handler_options = $options['widget_config'];
$handler_options = array_replace([
'handler_url' => $handler_url,
'method' => $options['type_config']['method'],
'allow_multiple' => $options['type_config']['allow_multiple'],
'preset' => $preset,
'preset_order' => array_reverse(array_keys($preset))
], $options['widget_config']);
// @todo widget_config constraints are ignored, but they are used in the wild...
$handler_options['constraints'] = $options['type_config']['constraints'];
$handler_options['handler_url'] = $handler_url;
$handler_options['method'] = $options['type_config']['method'];
$handler_options['allow_multiple'] = $options['type_config']['allow_multiple'];
$handler_options['preset'] = $preset;
$handler_options['preset_order'] = array_reverse(array_keys($preset));
$view->vars['min_chars'] = $options['widget_config']['min_chars'];
$view->vars['handler_options'] = json_encode($handler_options);

0 comments on commit 9852891

Please sign in to comment.
You can’t perform that action at this time.