diff --git a/libraries/default/RequestProcessors/GenericRequestProcessor.php b/libraries/default/RequestProcessors/GenericRequestProcessor.php index 1bfd974..dc07fff 100644 --- a/libraries/default/RequestProcessors/GenericRequestProcessor.php +++ b/libraries/default/RequestProcessors/GenericRequestProcessor.php @@ -66,8 +66,9 @@ class GenericRequestProcessor public function render($request=[], Cake\Http\ServerRequest $serverRequest) { - $processingTemplate = $this->getProcessingTemplate(); $viewVariables = $this->getViewVariables($request); + $this->updateProcessingTemplate($request); + $processingTemplate = $this->getProcessingTemplate(); $builder = new ViewBuilder(); $builder->disableAutoLayout() ->setClassName('Monad') diff --git a/libraries/default/RequestProcessors/LocalToolRequestProcessor.php b/libraries/default/RequestProcessors/LocalToolRequestProcessor.php index e5160bf..315c574 100644 --- a/libraries/default/RequestProcessors/LocalToolRequestProcessor.php +++ b/libraries/default/RequestProcessors/LocalToolRequestProcessor.php @@ -31,8 +31,9 @@ class LocalToolRequestProcessor extends GenericRequestProcessor return parent::create($requestData); } - protected function assignProcessingTemplate($connectorName) + protected function updateProcessingTemplate($request) { + $connectorName = $request->connector['connector']; $processingTemplatePath = sprintf('%s/%s/%s.php', $this->scope, $connectorName, $this->action); $file = new File($this->processingTemplatesDirectory . DS . $processingTemplatePath); if ($file->exists()) { diff --git a/libraries/default/RequestProcessors/templates/LocalTool/GenericRequest.php b/libraries/default/RequestProcessors/templates/LocalTool/GenericRequest.php index 514dc6f..093cd80 100644 --- a/libraries/default/RequestProcessors/templates/LocalTool/GenericRequest.php +++ b/libraries/default/RequestProcessors/templates/LocalTool/GenericRequest.php @@ -91,18 +91,13 @@ $form = $this->element('genericElements/Form/genericForm', [ 'raw' => true, 'data' => [ 'model' => 'Inbox', - 'fields' => [ - [ - 'field' => 'is_discard', - 'type' => 'checkbox', - 'default' => false - ] - ], + 'fields' => [], 'submit' => [ 'action' => $this->request->getParam('action') ] ] ]); +$localToolHTML = $this->fetch('content', sprintf('
%s
', json_encode($request['data'], JSON_PRETTY_PRINT))
);
-$bodyHtml = sprintf('