Commit a214c480 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Revert "Merge branch 'qfqFluidTemplate'"

This reverts commit d2054269
parent d2054269
Pipeline #1483 passed with stage
in 2 minutes and 7 seconds
......@@ -27,9 +27,7 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
public function showAction() {
$origErrorReporting = '';
$hasError = true;
$error = '';
$hasContent = false;
$flagOk = false;
try {
$contentObject = $this->configurationManager->getContentObject();
......@@ -41,38 +39,38 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
$qfq = new \qfq\QuickFormQuery($contentObject->data);
$html = $qfq->process();
$hasContent = (strlen(trim($html))<=0);
$hasError = false;
$flagOk = true;
} catch (qfq\UserFormException $e) {
$error = $e->formatMessage();
$html = $e->formatMessage();
} catch (qfq\UserReportException $e) {
$error = $e->formatMessage();
$html = $e->formatMessage();
} catch (qfq\CodeException $e) {
$error = $e->formatMessage();
$html = $e->formatMessage();
} catch (qfq\DbException $e) {
$error = $e->formatMessage();
$html = $e->formatMessage();
} catch (qfq\ShellException $e) {
$error = $e->formatMessage();
$html = $e->formatMessage();
} catch (qfq\DownloadException $e) {
$error = $e->formatMessage();
$html = $e->formatMessage();
} catch (\Exception $e) {
$error = "Generic Exception: " . $e->getMessage();
$html = "Generic Exception: " . $e->getMessage();
}
if (!$flagOk) {
$html = "<div class='alert alert-warning'>$html</div>";
}
// Restore has to be outside of try/catch - E_NOTICE needs to unset for further T3 handling after an QFQ Exception.
error_reporting($origErrorReporting);
$this->view->assign('qfqOutput', $html);
$this->view->assign('qfqError', $error);
$this->view->assign('qfqHasError', $hasError);
$this->view->assign('qfqHasContent', $hasContent);
return $this->view->render();
}
......
<f:layout name="Default" />
<f:comment>Currently not used.</f:comment>
<div class="qfq-default-layout">
<f:format.raw value="{qfqOutput}"/>
</div>
<f:layout name="Layout 1">
<div class="qfq-layout-1">
<f:format.raw value="{qfqOutput}"/>
</div>
</f:layout>
\ No newline at end of file
<f:layout name="Layout 2">
<div class="qfq-layout-2">
<f:format.raw value="{qfqOutput}"/>
</div>
</f:layout>
\ No newline at end of file
<f:layout name="Layout 3" />
<f:comment>Unwrapped raw output.</f:comment>
<f:format.raw value="{qfqOutput}"/>
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{qfqHasContent}">
<div class="qfq-default-layout">
<f:format.raw value="{qfqOutput}"/>
</div>
</f:if>
<f:if condition="{qfqHasError}">
<div class="alert alert-warning">
<f:format.raw value="{qfqError}"/>
</div>
</f:if>
\ No newline at end of file
<f:format.raw value="{qfqOutput}"/>
Markdown is supported
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