Small Project form order fix.

This commit is contained in:
Dmitry Khomutov 2017-06-20 19:51:27 +07:00
parent 95a24d8fe8
commit 87ef29269f
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -282,9 +282,10 @@ class ProjectController extends PHPCensor\Controller
$this->layout->title = Lang::get('add_project');
$this->requireAdmin();
$method = $this->request->getMethod();
$pub = null;
$values = $this->getParams();
$method = $this->request->getMethod();
$pub = null;
$values = $this->getParams();
$values['branch'] = '';
if ($method != 'POST') {
$sshKey = new SshKey();
@ -402,8 +403,10 @@ class ProjectController extends PHPCensor\Controller
protected function projectForm($values, $type = 'add')
{
$form = new Form();
$form->setMethod('POST');
$form->setAction(APP_URL.'project/' . $type);
$form->addField(new Form\Element\Csrf('csrf'));
$form->addField(new Form\Element\Hidden('pubkey'));
@ -495,6 +498,7 @@ class ProjectController extends PHPCensor\Controller
$form->addField($field);
$form->setValues($values);
return $form;
}