Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2018-11-17 02:39:44 +0300
committerOliver Schneider <oliver@assarbad.net>2018-11-17 02:39:44 +0300
commit1b4aed7fd8efd3920fb7da0ce322ff79df49868c (patch)
tree85a3707db110ff68a05367f04d37c72862b9ccf1
parent9fe2851a2a5f81ebca62bdf45428b6c2cee98ad1 (diff)
Honing some rough edges
-rw-r--r--web/templates/contact.html.j2.tmpl36
-rw-r--r--web/templates/include/styles.css1
2 files changed, 20 insertions, 17 deletions
diff --git a/web/templates/contact.html.j2.tmpl b/web/templates/contact.html.j2.tmpl
index 045ab81..b351fdb 100644
--- a/web/templates/contact.html.j2.tmpl
+++ b/web/templates/contact.html.j2.tmpl
@@ -5,9 +5,10 @@
norder = '-1'
%]
[%- PROCESS 'constants.tt' -%]
-{% if page.get %}
+{% if page.get and page.form %}
<p>All the fields have to be filled in ...</p>
-<form action="{{ page.uri }}" method="post" accept-charset="utf-8">
+<pre>{{ page|pprint }}</pre>
+<form action="{{ page.form.uri|urlencode }}" method="post" accept-charset="utf-8">
<table width="100%" summary="Mailform">
<colgroup>
<col width="30%" />
@@ -15,11 +16,11 @@
</colgroup>
<tr>
<td>
- <b>Who should receive the message?:</b>
+ <b>Who should receive the message:</b>
</td>
<td>
- <input type="hidden" name="{{ page.hidden }}" value="{{ page.hidden_value }}" />
- <select name="{{ page.recipient }}">
+ <input type="hidden" name="{{ page.form.hidden|e }}" value="{{ page.form.hidden_value|e }}" />
+ <select name="{{ page.form.recipient|e }}">
<option value="developers" selected="selected">Developers</option>
[%- FOREACH key IN gpg_keys.sort('name') -%]<option value="[%- key.name | lower -%]">[%- key.name -%]</option>[%- END -%]
<option value="team">The whole team</option>
@@ -28,30 +29,30 @@
</tr>
<tr>
<td>
- <b>Your email address (max. 100 chars):</b>
+ <b>Your email address:</b>
</td>
<td>
- <input type="text" name="{{ page.sender }}" maxlength="100" class="feld_" />
+ <input type="text" name="{{ page.form.sender|e }}" class="feld_" />
</td>
</tr>
<tr>
<td>
- <b>Subject (max. 100 chars):</b>
+ <b>Subject line:</b>
</td>
<td>
- <input type="text" name="{{ page.subject }}" maxlength="100" class="feld_" />
+ <input type="text" name="{{ page.form.subject|e }}" class="feld_" />
</td>
</tr>
<tr>
<td colspan="2">
<div><b>Here goes your text (barring technical issues it will be transmitted as encrypted email!):</b></div>
- <textarea name="{{ page.message }}" rows="15" cols="60" class="feld3"></textarea>
+ <textarea name="{{ page.form.message|e }}" class="feld3"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center; ">
<div><strong>NB:</strong> As a matter of courtesy you should consider adding your name (or even a pseudonym) in the message to us. You know our names as well. Besides, it makes it easier to address you in a response. Thank you.</div>
- <input type="submit" value="{{ page.send }}" class="btn" />
+ <input type="submit" value="{{ page.form.send|e }}" class="btn" />
</td>
</tr>
</table>
@@ -82,8 +83,7 @@ establish whether PGP/MIME can be used in future communication.
[%- END -%]
[%- END -%]
</ul>
-{% else %}
-{% if page.success %}
+{% elif page.success %}
<h1><span lang="en">Success</span> / <span lang="de">Erfolg</span></h1>
<section lang="en">
<h2>Your email was sent successfully (delivery may still fail, though)</h2>
@@ -91,17 +91,19 @@ establish whether PGP/MIME can be used in future communication.
<section lang="de">
<h2>Ihre Email wurde erfolgreich verschickt (die Zustellung kann dennoch fehlschlagen)</h2>
</section>
-<article><pre>\n{{ page.message }}\n</pre></article>
+<article><pre>{{ page.message|e }}</pre></article>
{% else %}
-<h1><span lang="en">Error</span> / <span lang="de">Fehler</span> {{ page.status }}</h1>
+<h1><span lang="en">Error</span> / <span lang="de">Fehler</span> {{ page.status.code|default("-1")|e }}</h1>
<section lang="en">
<h2>An error occurred when processing your request.</h2>
- <p>Status code {{ page.status }}: {{ page.status_description }}</p>
+ <p>Status code {{ page.status.code|default("-1")|e }}: {{ page.status.description|default("Unspecified error")|e }}</p>
</section>
<section lang="de">
<h2>Während der Verarbeitung Ihrer Anfrage kam es zu einem Fehler.</h2>
- <p>Statuscode {{ page.status }}: <span lang="en">{{ page.status_description }}</span> (Beschreibung auf Englisch)</p>
+ <p>Statuscode {{ page.status.code|default("-1")|e }}: <span lang="en">{{ page.status.description|default("Unspecified error")|e }}</span> (Beschreibung auf Englisch)</p>
</section>
+{% if page.message is defined %}
+<article><pre>{{ page.message|e }}</pre></article>
{% endif %}
{% endif %}
[% END %]
diff --git a/web/templates/include/styles.css b/web/templates/include/styles.css
index 8653bba..3cf4654 100644
--- a/web/templates/include/styles.css
+++ b/web/templates/include/styles.css
@@ -157,6 +157,7 @@ td.bordleft {
.feld3 {
border : 1px solid #cccccc;
width : 100%;
+ height: 25ex;
}
ul.download {