|
@@ -31,17 +31,14 @@ class Delete extends Page
|
|
|
$v = $this->c->Validator->reset()
|
|
|
->addRules([
|
|
|
'token' => 'token:DeletePost',
|
|
|
- 'confirm' => 'integer',
|
|
|
+ 'confirm' => 'integer', // ????
|
|
|
'delete' => 'string',
|
|
|
- 'cancel' => 'string',
|
|
|
])->addAliases([
|
|
|
])->addArguments([
|
|
|
'token' => $args,
|
|
|
]);
|
|
|
|
|
|
- if (! $v->validation($_POST) || null === $v->delete) {
|
|
|
- return $this->c->Redirect->page('ViewPost', $args)->message('Cancel redirect');
|
|
|
- } elseif ($v->confirm !== 1) {
|
|
|
+ if (! $v->validation($_POST) || $v->confirm !== 1) {
|
|
|
return $this->c->Redirect->page('ViewPost', $args)->message('No confirm redirect');
|
|
|
}
|
|
|
|
|
@@ -105,8 +102,9 @@ class Delete extends Page
|
|
|
'accesskey' => 'd',
|
|
|
],
|
|
|
'cancel' => [
|
|
|
- 'type' => 'submit',
|
|
|
+ 'type' => 'btn',
|
|
|
'value' => \ForkBB\__('Cancel'),
|
|
|
+ 'link' => $this->c->Router->link('ViewPost', $args),
|
|
|
],
|
|
|
],
|
|
|
];
|