changed the project related files to include the webhooks directory
This commit is contained in:
parent
a307d81bf0
commit
0af1bedea2
@ -207,7 +207,9 @@ class Project extends CI_Controller
|
||||
$this->form_validation->set_rules (
|
||||
'project_description', 'description', 'required');
|
||||
$this->form_validation->set_rules (
|
||||
'project_commitable', 'commitable', 'alpha');
|
||||
'project_webhooks', 'description', 'required');
|
||||
//$this->form_validation->set_rules (
|
||||
// 'project_commitable', 'commitable', 'alpha');
|
||||
$this->form_validation->set_rules (
|
||||
'project_public', 'public', 'alpha');
|
||||
$this->form_validation->set_rules (
|
||||
@ -230,6 +232,7 @@ class Project extends CI_Controller
|
||||
$project->name = $this->input->post('project_name');
|
||||
$project->summary = $this->input->post('project_summary');
|
||||
$project->description = $this->input->post('project_description');
|
||||
$project->webhooks = $this->input->post('project_webhooks');
|
||||
$project->commitable = $this->input->post('project_commitable');
|
||||
$project->public = $this->input->post('project_public');
|
||||
$project->members = array_unique (preg_split ('/[[:space:],]+/', $this->input->post('project_members')));
|
||||
@ -291,6 +294,7 @@ class Project extends CI_Controller
|
||||
$project->name = '';
|
||||
$project->summary = '';
|
||||
$project->description = '';
|
||||
$project->wehhooks = '';
|
||||
$project->commitable = 'Y';
|
||||
$project->public = 'Y';
|
||||
$project->members = array ($login['id']);
|
||||
@ -571,7 +575,7 @@ class Project extends CI_Controller
|
||||
else
|
||||
{
|
||||
// get project entries staring from the offset.
|
||||
$projects = $this->projects->getEntries ($login['id'], $offset, CODEPOT_MAX_PROJECTS_PER_PAGE, $search);
|
||||
$projects = $this->projects->getEntries($login['id'], $offset, CODEPOT_MAX_PROJECTS_PER_PAGE, $search);
|
||||
if ($projects === FALSE)
|
||||
{
|
||||
$status = 'dberr';
|
||||
@ -581,7 +585,11 @@ class Project extends CI_Controller
|
||||
{
|
||||
$status = 'ok';
|
||||
// exclude the description column
|
||||
foreach ($projects as $p) unset ($p->description);
|
||||
foreach ($projects as $p)
|
||||
{
|
||||
unset ($p->description);
|
||||
unset ($p->webhooks);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,6 +146,7 @@ class ProjectModel extends CI_Model
|
||||
$this->db->set ('name', $project->name);
|
||||
$this->db->set ('summary', $project->summary);
|
||||
$this->db->set ('description', $project->description);
|
||||
$this->db->set ('webhooks', $project->webhooks);
|
||||
$this->db->set ('commitable', $project->commitable);
|
||||
$this->db->set ('public', $project->public);
|
||||
$this->db->set ('createdon', codepot_nowtodbdate());
|
||||
@ -217,6 +218,7 @@ class ProjectModel extends CI_Model
|
||||
$this->db->set ('name', $project->name);
|
||||
$this->db->set ('summary', $project->summary);
|
||||
$this->db->set ('description', $project->description);
|
||||
$this->db->set ('webhooks', $project->webhooks);
|
||||
$this->db->set ('commitable', $project->commitable);
|
||||
$this->db->set ('public', $project->public);
|
||||
$this->db->set ('updatedon', codepot_nowtodbdate());
|
||||
|
@ -134,6 +134,23 @@ $this->load->view (
|
||||
?>
|
||||
</div>
|
||||
<div id='project_edit_description_preview' class='codepot-styled-text-preview'></div>
|
||||
j
|
||||
<div class='form_input_label'>
|
||||
<?php print form_label('Webhooks: ', 'project_webhooks')?>
|
||||
<?php print form_error('project_webhooks')?>
|
||||
</div>
|
||||
<div class='form_input_field'>
|
||||
<?php
|
||||
$xdata = array (
|
||||
'name' => 'project_webhooks',
|
||||
'value' => set_value ('project_webhooks', $project->webhooks),
|
||||
'id' => 'project_edit_webhooks',
|
||||
'rows' => 20,
|
||||
'cols' => 80
|
||||
);
|
||||
print form_textarea($xdata);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class='form_input_field'>
|
||||
<?php print form_label($this->lang->line('Commitable').': ', 'project_commitable')?>
|
||||
|
Loading…
Reference in New Issue
Block a user