Commit 85e189ac authored by Carsten  Rose's avatar Carsten Rose
Browse files

F6289: set formLog specific html id

parent 20b4a3ca
......@@ -1298,9 +1298,10 @@ const COLUMN_WRAP_TOKEN = '+';
const FORM_NAME_FORM = 'form';
const FORM_NAME_FORM_ELEMENT = 'formElement';
const FORM_LOG_MODE = '_formLogMode';
const FORM_LOG_MODE = '_formLogMode'; // Variable to call the form in debug mode.
const FORM_LOG_SESSION = 'logSession';
const FORM_LOG_ALL = 'logAll';
const FORM_LOG_HTML_ID = 'formLog-1';
// DOWNLOAD
const DOWNLOAD_MODE = 'mode';
......
......@@ -276,7 +276,8 @@ class QuickFormQuery {
}
/**
* Creates an empty file. This indicates that the current form is in debug mode.
* Creates an empty file. This indicates that the current form is in debug mode. Returns HTML element which will be
* replaced by the logfile.
*
* @param $formName
* @param $formLogMode
......@@ -288,11 +289,12 @@ class QuickFormQuery {
private function getFormLog($formName, $formLogMode) {
$formLogFileName = Support::getFormLogFileName($formName, $formLogMode);
file_put_contents($formLogFileName, 'hello world');
file_put_contents($formLogFileName, '');
$monitor = new Monitor();
return "<pre id='monitor-1'>Please wait</pre>" . $monitor->process([TOKEN_L_FILE => $formLogFileName, TOKEN_L_APPEND => '1']);
return "<pre id='" . FORM_LOG_HTML_ID . "'>Please wait</pre>" .
$monitor->process([TOKEN_L_FILE => $formLogFileName, TOKEN_L_APPEND => '1', TOKEN_L_HTML_ID => FORM_LOG_HTML_ID]);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment