ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
with_clear_button.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function with_clear_button()
8 {
9  global $DIC;
10 
11  $factory = $DIC->ui()->factory();
12  $renderer = $DIC->ui()->renderer();
13  $request = $DIC->http()->request();
14 
15  $submit_flag = 'dropzone_wrapper_with_clear_button';
16  $post_url = "{$request->getUri()}&$submit_flag";
17 
18  $dropzone = $factory
19  ->dropzone()->file()->wrapper(
20  'Upload your files here',
21  $post_url,
22  $factory->messageBox()->info('Drag and drop files onto me!'),
23  $factory->input()->field()->file(
25  'Your files'
26  )
27  );
28 
29  $dropzone = $dropzone->withActionButtons([
30  $factory->button()->standard('Clear files!', '#')->withOnClick($dropzone->getClearSignal())
31  ]);
32 
33  return $renderer->render($dropzone);
34 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...