summaryrefslogtreecommitdiff
path: root/app/Templates/config_index.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
committerFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
commit9eeded33f68872515954a2fc177fcb47a9273ae9 (patch)
treef3ef9507e087ca6bf3ce624232da240a8689b051 /app/Templates/config_index.php
parentc539bdc8ab746c5afd48cf87de057dc38d50adac (diff)
Add email notifications
Diffstat (limited to 'app/Templates/config_index.php')
-rw-r--r--app/Templates/config_index.php27
1 files changed, 19 insertions, 8 deletions
diff --git a/app/Templates/config_index.php b/app/Templates/config_index.php
index 91919776..11662c87 100644
--- a/app/Templates/config_index.php
+++ b/app/Templates/config_index.php
@@ -31,14 +31,25 @@
<div class="page-header">
<h2><?= t('User settings') ?></h2>
</div>
- <section class="settings">
- <ul>
- <li>
- <strong><?= t('My default project:') ?> </strong>
- <?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? Helper\escape($projects[$user['default_project_id']]) : t('None') ?>,
- <a href="?controller=user&amp;action=edit&amp;user_id=<?= $user['id'] ?>"><?= t('edit') ?></a>
- </li>
- </ul>
+ <section>
+ <h3 id="notifications"><?= t('Email notifications') ?></h3>
+ <form method="post" action="?controller=config&amp;action=notifications" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_checkbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
+
+ <p><?= t('I want to receive notifications only for those projects:') ?><br/><br/></p>
+
+ <div class="form-checkbox-group">
+ <?php foreach ($user_projects as $project_id => $project_name): ?>
+ <?= Helper\form_checkbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?>
+ <?php endforeach ?>
+ </div>
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+ </form>
</section>
<?php if ($user['is_admin']): ?>