diff options
author | Jonas Bröms <cez81@users.noreply.github.com> | 2017-10-26 10:47:16 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-10-26 16:47:16 +0800 |
commit | 4d01ecaef350c6df0c27913f05cc0537bed5f7e9 (patch) | |
tree | 932c38ef6ab83c31e2adef96ab884fb3587ddee4 | |
parent | 6a107e57f6ded230b9e9f6861ac2101a34f260b1 (diff) | |
download | gitea-4d01ecaef350c6df0c27913f05cc0537bed5f7e9.tar.gz gitea-4d01ecaef350c6df0c27913f05cc0537bed5f7e9.zip |
Show Sendmail settings on admin config page (#2782)
* Show Sendmail settings on admin config page
* Remove unecessary if statement
-rw-r--r-- | options/locale/locale_en-US.ini | 3 | ||||
-rw-r--r-- | templates/admin/config.tmpl | 17 |
2 files changed, 16 insertions, 4 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 686e353ea1..6fa33e97c0 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1412,6 +1412,9 @@ config.mailer_disable_helo = Disable HELO config.mailer_name = Name config.mailer_host = Host config.mailer_user = User +config.mailer_use_sendmail = Use Sendmail +config.mailer_sendmail_path = Sendmail Path +config.mailer_sendmail_args = Extra arguments to Sendmail config.send_test_mail = Send Test Email config.test_mail_failed = Failed to send test email to '%s': %v config.test_mail_sent = Test email has been sent to '%s'. diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index b57b1847f6..3af0c870c3 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -170,10 +170,19 @@ {{if .MailerEnabled}} <dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt> <dd>{{.Mailer.Name}}</dd> - <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt> - <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd> - <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt> - <dd>{{.Mailer.Host}}</dd> + {{if not .Mailer.UseSendmail}} + <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt> + <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt> + <dd>{{.Mailer.Host}}</dd> + {{else}} + <dt>{{.i18n.Tr "admin.config.mailer_use_sendmail"}}</dt> + <dd><i class="fa fa-check-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.mailer_sendmail_path"}}</dt> + <dd>{{.Mailer.SendmailPath}}</dd> + <dt>{{.i18n.Tr "admin.config.mailer_sendmail_args"}}</dt> + <dd>{{.Mailer.SendmailArgs}}</dd> + {{end}} <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt> <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br> <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post"> |