|
339 | 339 | $link_action = 'set_field'; |
340 | 340 | $link_attribs['target'] = '_parent'; |
341 | 341 | $link_attribs['class'] = 'action_icon select_file btn btn-primary btn-xs'; |
342 | | - $link_attribs['onclick'] = 'return window.parent.file_select_add( select_field_name, \''.$sfile_root.'\', \''.$sfile_path.'\' );'; |
| 342 | + $link_attribs['onclick'] = 'return window.parent.file_select_add( \''.$field_name.'\', \''.$sfile_root.'\', \''.$sfile_path.'\' );'; |
343 | 343 | echo action_icon( T_('Select file'), 'link', |
344 | 344 | regenerate_url( 'fm_selected', 'action=file_select&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()).'&'.url_crumb('file') ), |
345 | 345 | ' '.T_('Select'), NULL, 5, $link_attribs ); |
|
581 | 581 | $link_action = 'set_field'; |
582 | 582 | $link_attribs['target'] = '_parent'; |
583 | 583 | $link_attribs['class'] = 'action_icon select_file btn btn-primary btn-xs'; |
584 | | - $link_attribs['onclick'] = 'return window.parent.file_select_add( select_field_name, \''.$sfile_root.'\', \''.'$file_path$'.'\' );'; |
| 584 | + $link_attribs['onclick'] = 'return window.parent.file_select_add( \''.$field_name.'\', \''.$sfile_root.'\', \''.'$file_path$'.'\' );'; |
585 | 585 | $icon_to_select_files = action_icon( T_('Select file'), 'link', |
586 | 586 | regenerate_url( 'fm_selected', 'action=file_select&fm_selected[]='.'$file_path$'.'&'.url_crumb('file') ), |
587 | 587 | ' '.T_('Select'), NULL, 5, $link_attribs ).' '; |
|
760 | 760 | ?> |
761 | 761 | <script type="text/javascript"> |
762 | 762 | <!-- |
763 | | - var select_field_name = '<?php echo $field_name;?>'; |
764 | | - |
765 | 763 | function js_act_on_selected() |
766 | 764 | { |
767 | 765 | // There may be an easier selector than below but couldn't make sense of it :( |
|
0 commit comments