Use template for getHtmlForExportOptionsOutputRadio
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
5b6bd82145
commit
ebb22f8600
@ -463,16 +463,10 @@ class Export
|
||||
*/
|
||||
public static function getHtmlForExportOptionsOutputRadio()
|
||||
{
|
||||
$html = '<li>';
|
||||
$html .= '<input type="radio" id="radio_view_as_text" '
|
||||
. ' name="output_format" value="astext" ';
|
||||
if (isset($_GET['repopulate']) || $GLOBALS['cfg']['Export']['asfile'] == false) {
|
||||
$html .= 'checked="checked"';
|
||||
}
|
||||
$html .= '/>';
|
||||
$html .= '<label for="radio_view_as_text">'
|
||||
. __('View output as text') . '</label></li>';
|
||||
return $html;
|
||||
return Template::get('display/export/options_output_radio')->render([
|
||||
'has_repopulate' => isset($_GET['repopulate']),
|
||||
'export_asfile' => $GLOBALS['cfg']['Export']['asfile'],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
7
templates/display/export/options_output_radio.twig
Normal file
7
templates/display/export/options_output_radio.twig
Normal file
@ -0,0 +1,7 @@
|
||||
<li>
|
||||
<input type="radio" id="radio_view_as_text" name="output_format" value="astext"
|
||||
{{- has_repopulate or export_asfile == false ? ' checked' }}>
|
||||
<label for="radio_view_as_text">
|
||||
{% trans 'View output as text' %}
|
||||
</label>
|
||||
</li>
|
||||
Loading…
Reference in New Issue
Block a user