Small Project form order fix.
This commit is contained in:
parent
95a24d8fe8
commit
87ef29269f
|
@ -282,9 +282,10 @@ class ProjectController extends PHPCensor\Controller
|
||||||
$this->layout->title = Lang::get('add_project');
|
$this->layout->title = Lang::get('add_project');
|
||||||
$this->requireAdmin();
|
$this->requireAdmin();
|
||||||
|
|
||||||
$method = $this->request->getMethod();
|
$method = $this->request->getMethod();
|
||||||
$pub = null;
|
$pub = null;
|
||||||
$values = $this->getParams();
|
$values = $this->getParams();
|
||||||
|
$values['branch'] = '';
|
||||||
|
|
||||||
if ($method != 'POST') {
|
if ($method != 'POST') {
|
||||||
$sshKey = new SshKey();
|
$sshKey = new SshKey();
|
||||||
|
@ -402,8 +403,10 @@ class ProjectController extends PHPCensor\Controller
|
||||||
protected function projectForm($values, $type = 'add')
|
protected function projectForm($values, $type = 'add')
|
||||||
{
|
{
|
||||||
$form = new Form();
|
$form = new Form();
|
||||||
|
|
||||||
$form->setMethod('POST');
|
$form->setMethod('POST');
|
||||||
$form->setAction(APP_URL.'project/' . $type);
|
$form->setAction(APP_URL.'project/' . $type);
|
||||||
|
|
||||||
$form->addField(new Form\Element\Csrf('csrf'));
|
$form->addField(new Form\Element\Csrf('csrf'));
|
||||||
$form->addField(new Form\Element\Hidden('pubkey'));
|
$form->addField(new Form\Element\Hidden('pubkey'));
|
||||||
|
|
||||||
|
@ -495,6 +498,7 @@ class ProjectController extends PHPCensor\Controller
|
||||||
$form->addField($field);
|
$form->addField($field);
|
||||||
|
|
||||||
$form->setValues($values);
|
$form->setValues($values);
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue