Sidebar delete button for dirdir

Add a ‘Delete page’ button to dirdir’s sidebar. The revision directory is kept for recovery.


<input type="submit" name="dirdir_edit" value="Edit page" />
+ <input type="submit" name="dirdir_delete" value="Delete page" />

app.rc dirdir_init

if(~ 1 $#post_arg_dirdir_edit $#post_arg_dirdir_preview)
    handler_body_main=(tpl_handler `{get_lib_file dirdir/edit.tpl apps/dirdir/edit.tpl})

+ if not if(~ 1 $#post_arg_dirdir_delete)
+     rm $dirdir_file

if not if(! ~ '' $"post_arg_dirdir_save $"post_arg_edit_text)

To post a comment you need to login first.