Skip to content

Commit

Permalink
unlock in cancel action
Browse files Browse the repository at this point in the history
and actually use it in the edit form.
  • Loading branch information
splitbrain committed Apr 27, 2018
1 parent daa5910 commit 3f5c3c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions inc/Action/Cancel.php
Expand Up @@ -13,7 +13,11 @@
*/
class Cancel extends AbstractAliasAction {

/** @inheritdoc */
public function preProcess() {
global $ID;
unlock($ID);

// continue with draftdel -> redirect -> show
throw new ActionAbort('draftdel');
}
Expand Down
2 changes: 1 addition & 1 deletion inc/html.php
Expand Up @@ -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')));
Expand Down

0 comments on commit 3f5c3c1

Please sign in to comment.