Skip to content

Commit

Permalink
added extra data in UploadType
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Apr 6, 2023
1 parent d03224e commit 6d68330
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<div class="input-group-append col-sm-3 col-xl-5 p-0">
<div class="btn-group row mx-0 w-100" role="group" id="{{ id }}-btn-group">
<button class="btn btn-secondary col-6 open-file-manager-btn"
data-iframe-src="{{ path('file_manager', {'module': 1, 'conf': conf}) }}"
data-iframe-src="{{ path('file_manager', {'module': 1, 'conf': conf, 'extra': extra}) }}"
data-modal-title="{{ placeholder }}" data-input-id="{{ id }}" type="button"
id="{{ id }}-add-button"><span class="d-none d-xl-inline">{{ add_button_text }}</span> <i
class="jcon jcon-add"></i></button>
Expand Down
2 changes: 2 additions & 0 deletions src/Type/Extension/TEUploadTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ public function configureOptions(OptionsResolver $resolver)
'file_type' => 'file',
'conf' => null,
'allow_copy' => true,
'extra' => []
]);
}


public function buildView(FormView $view, FormInterface $form, array $options)
{
$view->vars['extra'] = $options['extra'];
$view->vars['delete_button_text'] = $options['delete_button_text'];
$view->vars['add_button_text'] = $options['add_button_text'];
$view->vars['placeholder'] = $options['placeholder'];
Expand Down

0 comments on commit 6d68330

Please sign in to comment.