Merge remote-tracking branch 'upstream/master'
Conflicts: composer.json
This commit is contained in:
commit
287a2b3632
49 changed files with 600 additions and 1032 deletions
|
|
@ -15,7 +15,6 @@ use b8;
|
|||
use b8\Controller;
|
||||
use b8\Store;
|
||||
use b8\Form;
|
||||
use b8\Registry;
|
||||
|
||||
/**
|
||||
* Project Controller - Allows users to create, edit and view projects.
|
||||
|
|
@ -175,7 +174,7 @@ class ProjectController extends \PHPCI\Controller
|
|||
*/
|
||||
protected function handleGithubResponse()
|
||||
{
|
||||
$github = \b8\Registry::getInstance()->get('github_app');
|
||||
$github = \b8\Config::getInstance()->get('phpci.github');
|
||||
$code = $this->getParam('code', null);
|
||||
|
||||
if (!is_null($code)) {
|
||||
|
|
@ -263,13 +262,15 @@ class ProjectController extends \PHPCI\Controller
|
|||
$field->setPattern('^(github|bitbucket|remote|local)');
|
||||
$field->setOptions($options);
|
||||
$field->setLabel('Where is your project hosted?');
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
if (isset($_SESSION['github_token'])) {
|
||||
$field = new Form\Element\Select('github');
|
||||
$field->setLabel('Choose a Github repository:');
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$field->setOptions($this->getGithubRepositories());
|
||||
$form->addField($field);
|
||||
}
|
||||
|
|
@ -303,24 +304,28 @@ class ProjectController extends \PHPCI\Controller
|
|||
$field->setRequired(true);
|
||||
$field->setValidator($referenceValidator);
|
||||
$field->setLabel('Repository Name / URL (Remote) or Path (Local)');
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Text('title');
|
||||
$field->setRequired(true);
|
||||
$field->setLabel('Project Title');
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\TextArea('key');
|
||||
$field->setRequired(false);
|
||||
$field->setLabel('Private key to use to access repository (leave blank for local and/or anonymous remotes)');
|
||||
$field->setClass('span7');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$field->setRows(6);
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Submit();
|
||||
$field->setValue('Save Project');
|
||||
$field->setContainerClass('form-group');
|
||||
$field->setClass('btn-success');
|
||||
$form->addField($field);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue