echo html_csrf_token(); ?> <div id="file_upload"> <?php if (!empty($error)) { ?> <div class="error"><?php echo $error; ?> </div> <?php } ?> <?php echo html_file_input($id); ?> <?php if ($allowed_extensions) { ?> <div class="hint"><?php printf(LANG_PARSER_FILE_EXTS_FIELD_HINT, implode(', ', array_map(function ($val) { return trim($val); }, explode(',', mb_strtoupper($allowed_extensions))))); ?> </div> <?php } ?> <?php if ($max_size_mb) {
<?php } ?> <div id="file_<?php echo $field->element_name; ?> _upload" <?php if ($value) { ?> style="display:none"<?php } ?> > <?php echo html_file_input($field->element_name); ?> <?php echo html_input('hidden', $field->element_name, ''); ?> <?php if ($field->data['allowed_extensions']) { ?> <div class="hint"><?php printf(LANG_PARSER_FILE_EXTS_FIELD_HINT, implode(', ', array_map(function ($val) { return trim($val); }, explode(',', mb_strtoupper($field->data['allowed_extensions']))))); ?> </div> <?php }
?> <?php if (!$errors) { ?> <fieldset> <legend><?php echo LANG_CP_INSTALL_PACKAGE_FILE; ?> </legend> <div class="field"> <?php echo html_file_input('package'); ?> <div class="hint"> <?php echo LANG_CP_INSTALL_PACKAGE_FILE_HINT; ?> </div> </div> </fieldset> <?php } ?> <?php