Skip to content
Snippets Groups Projects
Commit 3f5c3c1e authored by Andreas Gohr's avatar Andreas Gohr
Browse files

unlock in cancel action

and actually use it in the edit form.
parent daa5910c
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,11 @@ use dokuwiki\Action\Exception\ActionAbort;
*/
class Cancel extends AbstractAliasAction {
/** @inheritdoc */
public function preProcess() {
global $ID;
unlock($ID);
// continue with draftdel -> redirect -> show
throw new ActionAbort('draftdel');
}
......
......@@ -1804,7 +1804,7 @@ function html_edit(){
$form->addElement(form_makeOpenTag('div', array('class'=>'editButtons')));
$form->addElement(form_makeButton('submit', 'save', $lang['btn_save'], array('id'=>'edbtn__save', 'accesskey'=>'s', 'tabindex'=>'4')));
$form->addElement(form_makeButton('submit', 'preview', $lang['btn_preview'], array('id'=>'edbtn__preview', 'accesskey'=>'p', 'tabindex'=>'5')));
$form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_cancel'], array('tabindex'=>'6')));
$form->addElement(form_makeButton('submit', 'cancel', $lang['btn_cancel'], array('tabindex'=>'6')));
$form->addElement(form_makeCloseTag('div'));
$form->addElement(form_makeOpenTag('div', array('class'=>'summary')));
$form->addElement(form_makeTextField('summary', $SUM, $lang['summary'], 'edit__summary', 'nowrap', array('size'=>'50', 'tabindex'=>'2')));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment