You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-11-06 13:24:31 +03:00
Merge pull request #1793 from Tithugues/templatingErrorReportForm
Templating error report form.
This commit is contained in:
@@ -343,49 +343,20 @@ function PMA_translateStacktrace($stack)
|
||||
*/
|
||||
function PMA_getErrorReportForm()
|
||||
{
|
||||
$html = "";
|
||||
$html .= '<form action="error_report.php" method="post" name="report_frm"'
|
||||
. ' id="report_frm" class="ajax">'
|
||||
. '<fieldset style="padding-top:0px">';
|
||||
|
||||
$html .= '<p>' . __(
|
||||
'phpMyAdmin has encountered an error. We have collected data about'
|
||||
. ' this error as well as information about relevant configuration'
|
||||
. ' settings to send to the phpMyAdmin team to help us in'
|
||||
. ' debugging the problem.'
|
||||
) . '</p>';
|
||||
|
||||
$html .= '<div class="label"><label><p>'
|
||||
. __('You may examine the data in the error report:')
|
||||
. '</p></label></div>'
|
||||
. '<pre class="report-data">'
|
||||
. htmlspecialchars(PMA_getPrettyReportData())
|
||||
. '</pre>';
|
||||
|
||||
$html .= '<div class="label"><label><p>'
|
||||
. __('Please explain the steps that lead to the error:')
|
||||
. '</p></label></div>'
|
||||
. '<textarea class="report-description" name="description"'
|
||||
. 'id="report_description"></textarea>';
|
||||
|
||||
$html .= '<input type="checkbox" name="always_send"'
|
||||
. ' id="always_send_checkbox"/>'
|
||||
. '<label for="always_send_checkbox">'
|
||||
. __('Automatically send report next time')
|
||||
. '</label>';
|
||||
|
||||
$html .= '</fieldset>';
|
||||
|
||||
$html .= PMA_URL_getHiddenInputs();
|
||||
$datas = array(
|
||||
'report_data' => PMA_getPrettyReportData(),
|
||||
'hidden_inputs' => PMA_URL_getHiddenInputs(),
|
||||
'hidden_fields' => null,
|
||||
);
|
||||
|
||||
$reportData = PMA_getReportData();
|
||||
if (! empty($reportData)) {
|
||||
$html .= PMA_getHiddenFields($reportData);
|
||||
if (!empty($reportData)) {
|
||||
$datas['hidden_fields'] = PMA_getHiddenFields($reportData);
|
||||
}
|
||||
|
||||
$html .= '</form>';
|
||||
|
||||
return $html;
|
||||
include_once './libraries/Template.class.php';
|
||||
return PMA\Template::get('error/report_form')
|
||||
->render($datas);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
35
templates/error/report_form.phtml
Normal file
35
templates/error/report_form.phtml
Normal file
@@ -0,0 +1,35 @@
|
||||
<form action="error_report.php" method="post" name="report_frm" id="report_frm"
|
||||
class="ajax">
|
||||
<fieldset style="padding-top:0px">
|
||||
|
||||
<p>
|
||||
<?php echo __(
|
||||
'phpMyAdmin has encountered an error. We have collected data about'
|
||||
. ' this error as well as information about relevant configuration'
|
||||
. ' settings to send to the phpMyAdmin team to help us in'
|
||||
. ' debugging the problem.'
|
||||
) ?>
|
||||
</p>
|
||||
|
||||
<div class="label"><label><p>
|
||||
<?php echo __('You may examine the data in the error report:') ?>
|
||||
</p></label></div>
|
||||
<pre class="report-data"><?php echo htmlspecialchars($report_data) ?></pre>
|
||||
|
||||
<div class="label"><label><p>
|
||||
<?php echo __('Please explain the steps that lead to the error:') ?>
|
||||
</p></label>
|
||||
</div>
|
||||
<textarea class="report-description" name="description"
|
||||
id="report_description"></textarea>
|
||||
|
||||
<input type="checkbox" name="always_send" id="always_send_checkbox" />
|
||||
<label for="always_send_checkbox">
|
||||
<?php echo __('Automatically send report next time') ?>
|
||||
</label>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<?php echo $hidden_inputs ?>
|
||||
<?php echo $hidden_fields ?>
|
||||
</form>
|
||||
Reference in New Issue
Block a user