Skip to content
Permalink
Browse files

Merge pull request #198 from flack/Dev

Allow other methods (e.g.POST) for autocomplete widget
  • Loading branch information...
flack committed Mar 22, 2019
2 parents e2e7913 + 78ccff6 commit f8c81e7e2e63b18fcb395fd1aff7affa05f68d74
@@ -69,6 +69,7 @@ public function configureOptions(OptionsResolver $resolver)
$resolver->setNormalizer('type_config', function (Options $options, $value) {
$type_defaults = [
'options' => [],
'method' => 'GET',
'constraints' => [],
'allow_other' => false,
'allow_multiple' => ($options['dm2_type'] == 'mnrelation'),
@@ -141,6 +142,7 @@ public function finishView(FormView $view, FormInterface $form, array $options)
$handler_options = $options['widget_config'];
$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));
@@ -56,9 +56,11 @@ var midcom_helper_datamanager2_autocomplete = {
}

query_options.term = term;

$.ajax({
url: query_options.handler_url,
dataType: "json",
method: query_options.method,
data: query_options,
success: function(data) {
if (!$.isEmptyObject(data)) {

0 comments on commit f8c81e7

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