Conifgure email settings through user interface

This commit is contained in:
Frederic Guillot
2016-06-05 14:53:46 -04:00
parent a08339059b
commit cd4c09c10a
35 changed files with 213 additions and 82 deletions

View File

@@ -9,9 +9,6 @@
<?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?>
<p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p>
<?= $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('Language'), 'application_language') ?>
<?= $this->form->select('application_language', $languages, $values, $errors) ?>

View File

@@ -0,0 +1,18 @@
<div class="page-header">
<h2><?= t('Email settings') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'email')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $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->hook->render('template:config:email', array('values' => $values, 'errors' => $errors)) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>

View File

@@ -7,6 +7,9 @@
<li <?= $this->app->checkMenuSelection('ConfigController', 'application') ?>>
<?= $this->url->link(t('Application settings'), 'ConfigController', 'application') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'email') ?>>
<?= $this->url->link(t('Email settings'), 'ConfigController', 'email') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'project') ?>>
<?= $this->url->link(t('Project settings'), 'ConfigController', 'project') ?>
</li>