File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
{{-- browse server input --}}
2
-
2
+ @php
3
+ $field [' attributes' ][' data-elfinder-trigger-url' ] = $field [' attributes' ][' data-elfinder-trigger-url' ] ?? url (config (' elfinder.route.prefix' ). '/ popup/' . $field [' name' ]);
4
+ $field [' attributes' ][' data-elfinder-trigger-url' ] .= ' ?mimes=' . urlencode (Crypt:: encrypt ($field [' mime_types' ] ?? ' ' ));
5
+ @endphp
3
6
@include (' crud::fields.inc.wrapper_start' )
4
-
5
7
<label >{!! $field [' label' ] ! !} </label >
6
8
@include (' crud::fields.inc.translatable_icon' )
7
9
<div class =" input-group" >
10
12
name =" {{ $field [' name' ] } }"
11
13
value =" {{ old_empty_or_null ($field [' name' ], ' ' ) ?? $field [' value' ] ?? $field [' default' ] ?? ' ' } }"
12
14
data-init-function =" bpFieldInitBrowseElement"
13
- data-elfinder-trigger-url =" {{ url (config (' elfinder.route.prefix' ). ' /popup' ) } }"
14
15
@include (' crud::fields.inc.attributes' )
15
16
16
17
@if (! isset ($field [' readonly' ]) || $field [' readonly' ] ) readonly @endif
@@ -71,7 +72,7 @@ function bpFieldInitBrowseElement(element) {
71
72
72
73
// trigger the reveal modal with elfinder inside
73
74
$ .colorbox ({
74
- href: triggerUrl + ' / ' + name ,
75
+ href: triggerUrl,
75
76
fastIframe: false ,
76
77
iframe: true ,
77
78
width: ' 80%' ,
Original file line number Diff line number Diff line change 11
11
$field [' wrapper' ][' data-init-function' ] = $field [' wrapper' ][' data-init-function' ] ?? ' bpFieldInitBrowseMultipleElement' ;
12
12
$field [' wrapper' ][' data-elfinder-trigger-url' ] = $field [' wrapper' ][' data-elfinder-trigger-url' ] ?? url (config (' elfinder.route.prefix' ). '/ popup/' . $field [' name' ]. ' ?multiple=1' );
13
13
14
- if (isset ($field [' mime_types' ])) {
15
- $field [' wrapper' ][' data-elfinder-trigger-url' ] .= ' &mimes=' . urlencode (Crypt:: encrypt ($field [' mime_types' ]));
16
- }
14
+ $field [' wrapper' ][' data-elfinder-trigger-url' ] .= ' &mimes=' . urlencode (Crypt:: encrypt ($field [' mime_types' ] ?? ' ' ));
17
15
18
16
if ($multiple ) {
19
17
$field [' wrapper' ][' data-multiple' ] = " true" ;
You can’t perform that action at this time.
0 commit comments