Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,12 @@ public function render($format, Doku_Renderer $R, $data) {
if(isset($_POST['bureaucracy']) && checkSecurityToken() && $_POST['bureaucracy']['$$id'] == $this->form_id) {
$success = $this->_handlepost($data);
if($success !== false) {
$R->doc .= '<div class="bureaucracy__plugin" id="scroll__here">' . $success . '</div>';
//$R->doc .= '<div class="bureaucracy__plugin" id="scroll__here">' . $success . '</div>';
$split = strpos($success, "<div");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is that <div> coming from?

$R->doc = '<div class="bureaucracy__plugin" id="scroll__here">'.$R->render_text(substr($success,0,$split)).'</div>'.substr($success,$split);
return true;
}
}

$R->doc .= $this->_htmlform($data['fields']);

return true;
Expand Down Expand Up @@ -316,7 +317,7 @@ private function _handlepost($data) {
}

$thanks_array = array();

foreach($data['actions'] as $actionData) {
/** @var helper_plugin_bureaucracy_action $action */
$action = $this->loadHelper($actionData['actionname'], false);
Expand All @@ -343,13 +344,13 @@ private function _handlepost($data) {
foreach($data['fields'] as $field) {
$field->after_action();
}

// create thanks string
$thanks = '';
foreach(array_unique($thanks_array) as $thanks_string) {
$thanks .= '<p>' . $thanks_string . '</p>';
$thanks .= html_entity_decode($thanks_string);
}

return $thanks;
}

Expand Down