summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Project.php7
-rw-r--r--app/Locale/fr_FR/translations.php1
-rw-r--r--app/Template/project/edit.php6
3 files changed, 12 insertions, 2 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index fb0a8d05..4e01271a 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -23,7 +23,7 @@ class Project extends Base
else {
$project_ids = $this->projectPermission->getMemberProjectIds($this->userSession->getId());
}
-
+
$nb_projects = count($project_ids);
$paginator = $this->paginator
@@ -128,6 +128,11 @@ class Project extends Base
{
$project = $this->getProject();
$values = $this->request->getValues();
+
+ if ($project['is_private'] == 1) {
+ $values += array('is_private' => 0);
+ }
+
list($valid, $errors) = $this->project->validateModification($values);
if ($valid) {
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index 5354970a..7c405a08 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -777,4 +777,5 @@ return array(
'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => 'Ces horaires sont utilisés lorsque la case « Toute la journée » est cochée pour les heures d\'absences ou supplémentaires programmées.',
'Files' => 'Fichiers',
'Images' => 'Images',
+ 'Private project' => 'Projet privé',
);
diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php
index 37b03fe1..c1f98315 100644
--- a/app/Template/project/edit.php
+++ b/app/Template/project/edit.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('Edit project') ?></h2>
</div>
-<form method="post" action="<?= $this->u('project', 'update', array('project_id' => $values['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->u('project', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->formHidden('id', $values) ?>
@@ -30,6 +30,10 @@
</div>
<div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <?php if ($project['is_private'] == 1 && $this->userSession->isAdmin()): ?>
+ <?= $this->formCheckbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
+ <?php endif ?>
+
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</div>