summaryrefslogtreecommitdiff
path: root/app/Template/user
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/user')
-rw-r--r--app/Template/user/create_local.php2
-rw-r--r--app/Template/user/create_remote.php2
-rw-r--r--app/Template/user/notifications.php27
-rw-r--r--app/Template/user/sidebar.php2
4 files changed, 12 insertions, 21 deletions
diff --git a/app/Template/user/create_local.php b/app/Template/user/create_local.php
index 3c8b43b0..98c38f0d 100644
--- a/app/Template/user/create_local.php
+++ b/app/Template/user/create_local.php
@@ -37,7 +37,7 @@
<?= $this->form->label(t('Language'), 'language') ?>
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
- <?= $this->form->checkbox('notifications_enabled', t('Enable notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?>
+ <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?>
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
<?= $this->form->checkbox('is_project_admin', t('Project Administrator'), 1, isset($values['is_project_admin']) && $values['is_project_admin'] == 1 ? true : false) ?>
</div>
diff --git a/app/Template/user/create_remote.php b/app/Template/user/create_remote.php
index 559d3d72..49d1548c 100644
--- a/app/Template/user/create_remote.php
+++ b/app/Template/user/create_remote.php
@@ -40,7 +40,7 @@
<?= $this->form->label(t('Language'), 'language') ?>
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
- <?= $this->form->checkbox('notifications_enabled', t('Enable notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?>
+ <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?>
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
<?= $this->form->checkbox('is_project_admin', t('Project Administrator'), 1, isset($values['is_project_admin']) && $values['is_project_admin'] == 1 ? true : false) ?>
<?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?>
diff --git a/app/Template/user/notifications.php b/app/Template/user/notifications.php
index a425705d..7223013c 100644
--- a/app/Template/user/notifications.php
+++ b/app/Template/user/notifications.php
@@ -1,33 +1,24 @@
<div class="page-header">
- <h2><?= t('Email notifications') ?></h2>
+ <h2><?= t('Notifications') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
- <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br>
+ <?= $this->form->checkbox('notifications_enabled', t('Enable notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br>
<hr>
-
- <?= t('I want to receive notifications for:') ?>
-
- <?= $this->form->radios('notifications_filter', array(
- \Model\Notification::FILTER_NONE => t('All tasks'),
- \Model\Notification::FILTER_ASSIGNEE => t('Only for tasks assigned to me'),
- \Model\Notification::FILTER_CREATOR => t('Only for tasks created by me'),
- \Model\Notification::FILTER_BOTH => t('Only for tasks created by me and assigned to me'),
- ), $notifications) ?><br>
+ <h4><?= t('Notification methods:') ?></h4>
+ <?= $this->form->checkboxes('notification_types', $types, $notifications) ?>
<hr>
+ <h4><?= t('I want to receive notifications for:') ?></h4>
+ <?= $this->form->radios('notifications_filter', $filters, $notifications) ?>
+ <hr>
<?php if (! empty($projects)): ?>
- <p><?= t('I want to receive notifications only for those projects:') ?><br/><br/></p>
-
- <div class="form-checkbox-group">
- <?php foreach ($projects as $project_id => $project_name): ?>
- <?= $this->form->checkbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br>
- <?php endforeach ?>
- </div>
+ <h4><?= t('I want to receive notifications only for those projects:') ?></h4>
+ <?= $this->form->checkboxes('notification_projects', $projects, $notifications) ?>
<?php endif ?>
<div class="form-actions">
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index 640c8b80..ca1e0621 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -51,7 +51,7 @@
<?= $this->url->link(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?>
</li>
<li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'notifications' ? 'class="active"' : '' ?>>
- <?= $this->url->link(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
</li>
<li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'external' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>