diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-05 11:54:27 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-05 11:54:27 -0500 |
commit | d0a1ed9227a5166aa56d37ccea142cdb1e0ae082 (patch) | |
tree | ccdf94fcd4befcf167a4f7b6fd62d0cb7f3bc5b4 /app/Template/config/email.php | |
parent | a2e2ab8997cc57042aadbd507109acdbe0475c2d (diff) |
Add configuration parameter to disable email configuration from user interface
Diffstat (limited to 'app/Template/config/email.php')
-rw-r--r-- | app/Template/config/email.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/Template/config/email.php b/app/Template/config/email.php index bc2c2ae5..be729f5d 100644 --- a/app/Template/config/email.php +++ b/app/Template/config/email.php @@ -6,11 +6,15 @@ <fieldset> <legend><?= t('Outgoing Emails') ?></legend> - <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?> - <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> + <?php if (MAIL_CONFIGURATION): ?> + <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?> + <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> - <?= $this->form->label(t('Email transport'), 'mail_transport') ?> - <?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?> + <?= $this->form->label(t('Email transport'), 'mail_transport') ?> + <?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?> + <?php else: ?> + <p class="alert"><?= t('The email configuration has been disabled by the administrator.') ?></p> + <?php endif ?> </fieldset> <?= $this->hook->render('template:config:email', array('values' => $values, 'errors' => $errors)) ?> |