Add configurable list of predefined subjects when sending a task by email
This commit is contained in:
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
'Assign the task to its creator' => 'Assigner une tâche à son créateur',
|
||||
'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».',
|
||||
'Log this action in a comment' => 'Enregistrez cette action dans un commentaire',
|
||||
'Predefined Email Subjects' => 'Sujets de courrier électronique prédéfinis',
|
||||
'Write one subject by line.' => 'Écrivez un sujet par ligne.',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -1337,4 +1337,6 @@ return array(
|
||||
// 'Assign the task to its creator' => '',
|
||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
// 'Log this action in a comment' => '',
|
||||
// 'Predefined Email Subjects' => '',
|
||||
// 'Write one subject by line.' => '',
|
||||
);
|
||||
|
||||
@@ -8,7 +8,12 @@ use PDO;
|
||||
use Kanboard\Core\Security\Token;
|
||||
use Kanboard\Core\Security\Role;
|
||||
|
||||
const VERSION = 123;
|
||||
const VERSION = 124;
|
||||
|
||||
function version_124(PDO $pdo)
|
||||
{
|
||||
$pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT');
|
||||
}
|
||||
|
||||
function version_123(PDO $pdo)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,12 @@ use PDO;
|
||||
use Kanboard\Core\Security\Token;
|
||||
use Kanboard\Core\Security\Role;
|
||||
|
||||
const VERSION = 102;
|
||||
const VERSION = 103;
|
||||
|
||||
function version_103(PDO $pdo)
|
||||
{
|
||||
$pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT');
|
||||
}
|
||||
|
||||
function version_102(PDO $pdo)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,12 @@ use Kanboard\Core\Security\Token;
|
||||
use Kanboard\Core\Security\Role;
|
||||
use PDO;
|
||||
|
||||
const VERSION = 114;
|
||||
const VERSION = 115;
|
||||
|
||||
function version_115(PDO $pdo)
|
||||
{
|
||||
$pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT');
|
||||
}
|
||||
|
||||
function version_114(PDO $pdo)
|
||||
{
|
||||
|
||||
@@ -63,5 +63,11 @@
|
||||
<?= $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?= t('Predefined Email Subjects') ?></legend>
|
||||
<?= $this->form->textarea('predefined_email_subjects', $values, $errors, array('tabindex="11"')) ?>
|
||||
<p class="form-help"><?= t('Write one subject by line.') ?></p>
|
||||
</fieldset>
|
||||
|
||||
<?= $this->modal->submitButtons(array('tabindex' => 11)) ?>
|
||||
</form>
|
||||
|
||||
@@ -22,6 +22,22 @@
|
||||
|
||||
<?= $this->form->label(t('Subject'), 'subject') ?>
|
||||
<?= $this->form->text('subject', $values, $errors, array('required', 'tabindex="2"')) ?>
|
||||
<?php if (! empty($project['predefined_email_subjects'])): ?>
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-archive"></i><i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<?php foreach (explode("\r\n", trim($project['predefined_email_subjects'])) as $subject): ?>
|
||||
<?php $subject = trim($subject); ?>
|
||||
|
||||
<?php if (! empty($subject)): ?>
|
||||
<li data-subject="<?= $this->text->e($subject) ?>" class="js-autocomplete-subject">
|
||||
<?= $this->text->e($subject) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->form->checkbox('add_comment', t('Log this action in a comment'), 1) ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user