ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
with_clear_button.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
35{
36 global $DIC;
37
38 $factory = $DIC->ui()->factory();
39 $renderer = $DIC->ui()->renderer();
40 $request = $DIC->http()->request();
41
42 $submit_flag = 'dropzone_wrapper_with_clear_button';
43 $post_url = "{$request->getUri()}&$submit_flag";
44
45 $dropzone = $factory
46 ->dropzone()->file()->wrapper(
47 'Upload your files here',
48 $post_url,
49 $factory->messageBox()->info('Drag and drop files onto me!'),
50 $factory->input()->field()->file(
52 'Your files'
53 )
54 );
55
56 $dropzone = $dropzone->withActionButtons([
57 $factory->button()->standard('Clear files!', '#')->withOnClick($dropzone->getClearSignal())
58 ]);
59
60 return $renderer->render($dropzone);
61}
$renderer
@ilCtrl_isCalledBy ilUIAsyncDemoFileUploadHandlerGUI: ilUIPluginRouterGUI
global $DIC
Definition: shib_login.php:26