$description_html = htmlspecialchars($description);
// Buttons
- $buttons = '<button name="action" type="submit" value="preview">Vorschau';
- if ($hide_save_button) $buttons .= ' & Speichern';
- $buttons .= '</button>';
- if (!$hide_save_button) $buttons .= '<button name="action" type="submit" value="store">Speichern</button>';
+ // I would like to do it this way, but due to a bug of internet explorer, the <button> element is not useable.
+ // $buttons = '<button name="action" type="submit" value="preview">Vorschau';
+ // if ($hide_save_button) $buttons .= ' & Speichern';
+ // $buttons .= '</button>';
+ // if (!$hide_save_button) $buttons .= '<button name="action" type="submit" value="store">Speichern</button>';
+ // Workaround: User <input type="submit"/>
+ $buttons = '<input name="preview" type="submit" value="Vorschau';
+ if ($hide_save_button) $buttons .= ' & Speichern';
+ $buttons .= '" /> ';
+ if (!$hide_save_button) $buttons .= '<input name="store" type="submit" value="Speichern"/>';
$form = <<<EOT
<form action="/wiki/Spezial:Bahnberichte" method="post">
// Get request data
$action = $wgRequest->getText('action');
- if ($action === '') $action = 'view';
+ if (!$action) {
+ if ($wgRequest->getVal('preview')) $action = 'preview';
+ elseif ($wgRequest->getVal('store')) $action = 'store';
+ else $action = 'view';
+ }
if ($override_action) $action = $override_action;
// Show error message