Skip to content

Commit b215304

Browse files
committed
Allow to download the list of order parts, in show_order_parts.php
1 parent 7b7faa3 commit b215304

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

show_order_parts.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,19 @@ function get_suppliers_template_loop($suppliers, $selected_supplier_id)
305305
// export formats
306306
$html->setLoop('export_formats', buildExportFormatsLoop('orderparts', $export_format_id));
307307

308-
if (isset($export_string)) {
309-
$html->setVariable('export_result', str_replace("\n", '<br>', str_replace("\n ", '<br>&nbsp;&nbsp;', // yes, this is quite ugly,
310-
str_replace("\n ", '<br>&nbsp;&nbsp;&nbsp;&nbsp;', // but the result is pretty ;-)
311-
htmlspecialchars($export_string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')))), 'string');
312-
}
313-
314-
// global stuff
315-
$html->setVariable('disable_footprints', $config['footprints']['disable'], 'boolean');
316-
$html->setVariable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
317-
$html->setVariable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
308+
/*
309+
if (isset($export_string)) {
310+
$html->setVariable('export_result', str_replace("\n", '<br>', str_replace("\n ", '<br>&nbsp;&nbsp;', // yes, this is quite ugly,
311+
str_replace("\n ", '<br>&nbsp;&nbsp;&nbsp;&nbsp;', // but the result is pretty ;-)
312+
htmlspecialchars($export_string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')))), 'string');
313+
}*/
314+
315+
$html->setVariable('export_result', "$export_string");
316+
317+
// global stuff
318+
$html->setVariable('disable_footprints', $config['footprints']['disable'], 'boolean');
319+
$html->setVariable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
320+
$html->setVariable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
318321

319322
$html->setVariable('use_modal_popup', $config['popup']['modal'], 'boolean');
320323
$html->setVariable('popup_width', $config['popup']['width'], 'integer');

templates/nextgen/show_order_parts.php/smarty_show_order_parts.tpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
<div class="panel panel-default">
161161
<div class="panel-heading">{t}Bauteile Export{/t}</div>
162162
<div class="panel-body">
163-
<form method="post" action="" class="form-horizontal no-progbar">
163+
<form method="post" action="" class="form-horizontal no-progbar no-ajax">
164164
<div class="form-group">
165165
<label class="control-label col-md-3">{t}Format:{/t}</label>
166166
<div class="col-md-9">
@@ -180,9 +180,7 @@
180180
</form>
181181
{if isset($export_result) && !empty($export_result)}
182182
<hr>
183-
<code>
184-
{$export_result}
185-
</code>
183+
<textarea disabled class="form-control" rows="10">{$export_result}</textarea>
186184
{/if}
187185
</div>
188186
</div>

0 commit comments

Comments
 (0)