зеркало из https://github.com/nextcloud/forms.git
Allow reloading result page
Routing is done in vue. But we should return the template also on the results endpoint so you can properly reload it. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Родитель
7910d76618
Коммит
d8f3169b1b
|
@ -29,6 +29,7 @@ return [
|
|||
['name' => 'page#create_form', 'url' => '/new', 'verb' => 'GET'],
|
||||
['name' => 'page#edit_form', 'url' => '/edit/{hash}', 'verb' => 'GET'],
|
||||
['name' => 'page#clone_form', 'url' => '/clone/{hash}', 'verb' => 'GET'],
|
||||
['name' => 'page#getResult', 'url' => '/results/{id}', 'verb' => 'GET'],
|
||||
|
||||
['name' => 'page#delete_form', 'url' => '/delete', 'verb' => 'POST'],
|
||||
['name' => 'page#insert_vote', 'url' => '/insert/vote', 'verb' => 'POST'],
|
||||
|
|
|
@ -570,4 +570,14 @@ class PageController extends Controller {
|
|||
Util::writeLog('forms', $this->userId, Util::ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @param int $id
|
||||
* @return TemplateResponse
|
||||
*/
|
||||
public function getResult(int $id): TemplateResponse {
|
||||
return new TemplateResponse('forms', 'forms.tmpl');
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче