[PATCH 3 of 8] admin: e-mail: simplify list of settings to display

Thomas De Schampheleire patrickdepinguin at gmail.com
Wed Jul 22 19:50:03 UTC 2015


# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1437508498 -7200
#      Tue Jul 21 21:54:58 2015 +0200
# Node ID 07fc479b91cef2b8f6240d1b64baabdf3caebdc0
# Parent  f219f0a41f57655dd2125c9371db9ee1ac217a4b
admin: e-mail: simplify list of settings to display

By centralizing the c.ini.get call of e-mail settings, the entry becomes a
key that can be used for label references in a subsequent patch.

Remove the empty title attribute for dd.

diff --git a/kallithea/templates/admin/settings/settings_email.html b/kallithea/templates/admin/settings/settings_email.html
--- a/kallithea/templates/admin/settings/settings_email.html
+++ b/kallithea/templates/admin/settings/settings_email.html
@@ -1,23 +1,23 @@
 <dl class="dl-horizontal">
 <%
  elems = [
-    (_('Email prefix'), c.ini.get('email_prefix'), ''),
-    (_('Kallithea email from'), c.ini.get('app_email_from'), ''),
-    (_('Error email from'), c.ini.get('error_email_from'), ''),
-    (_('Error email recipients'), c.ini.get('email_to'), ''),
+    (_('Email prefix'), 'email_prefix'),
+    (_('Kallithea email from'), 'app_email_from'),
+    (_('Error email from'), 'error_email_from'),
+    (_('Error email recipients'), 'email_to'),
 
-    (_('SMTP server'), c.ini.get('smtp_server'), ''),
-    (_('SMTP username'), c.ini.get('smtp_username'), ''),
-    (_('SMTP port'), c.ini.get('smtp_port'), ''),
+    (_('SMTP server'), 'smtp_server'),
+    (_('SMTP username'), 'smtp_username'),
+    (_('SMTP port'), 'smtp_port'),
 
-    (_('SMTP use TLS'), c.ini.get('smtp_use_tls'), ''),
-    (_('SMTP use SSL'), c.ini.get('smtp_use_ssl'), ''),
-    (_('SMTP auth'), c.ini.get('smtp_auth'), ''),
+    (_('SMTP use TLS'), 'smtp_use_tls'),
+    (_('SMTP use SSL'), 'smtp_use_ssl'),
+    (_('SMTP auth'), 'smtp_auth'),
  ]
 %>
-%for dt, dd, tt in elems:
+%for dt, dd in elems:
   <dt style="width:150px; text-align: left">${dt}:</dt>
-  <dd style="margin-left: 160px" title="${tt}">${dd}</dd>
+  <dd style="margin-left: 160px">${c.ini.get(dd)}</dd>
 %endfor
 </dl>
 


More information about the kallithea-general mailing list