Allow projects to be archived.

Closes #771
This commit is contained in:
Alex Davyskiba 2015-01-31 11:50:57 +02:00 committed by Dan Cryer
commit 1466ad06ef
17 changed files with 107 additions and 3 deletions

View file

@ -282,6 +282,7 @@ class ProjectController extends PHPCI\Controller
'ssh_public_key' => $this->getParam('pubkey', null),
'build_config' => $this->getParam('build_config', null),
'allow_public_status' => $this->getParam('allow_public_status', 0),
'archived' => $this->getParam('archived', 0),
'branch' => $this->getParam('branch', null),
);
@ -357,6 +358,12 @@ class ProjectController extends PHPCI\Controller
$field->setValue(0);
$form->addField($field);
$field = Form\Element\Checkbox::create('archived', Lang::get('archived'), false);
$field->setContainerClass('form-group');
$field->setCheckedValue(1);
$field->setValue(0);
$form->addField($field);
$field = new Form\Element\Submit();
$field->setValue(Lang::get('save_project'));
$field->setContainerClass('form-group');