summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2005-09-04 11:10:45 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2005-09-04 11:10:45 +0000
commitb8245231eb203ee90aa5d47e3718119a5ca189b0 (patch)
treeb01562b3ae87590b0ba441769ed516d2e5be1bf7 /www-apps/pyblosxom-plugins/files
parentFixed digests (diff)
downloadoverlay-b8245231eb203ee90aa5d47e3718119a5ca189b0.tar.gz
overlay-b8245231eb203ee90aa5d47e3718119a5ca189b0.tar.bz2
overlay-b8245231eb203ee90aa5d47e3718119a5ca189b0.zip
Fixed contact styles
svn path=/; revision=343
Diffstat (limited to 'www-apps/pyblosxom-plugins/files')
-rw-r--r--www-apps/pyblosxom-plugins/files/contact.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/www-apps/pyblosxom-plugins/files/contact.py b/www-apps/pyblosxom-plugins/files/contact.py
index f44f8a6..3f3e00c 100644
--- a/www-apps/pyblosxom-plugins/files/contact.py
+++ b/www-apps/pyblosxom-plugins/files/contact.py
@@ -46,23 +46,8 @@ MESSAGE_KEY = "contact_error_message"
_form_fields = ['name', 'email', 'subject', 'message']
_default_template = """
-<style type="text/css">
-<!--
-#contactForm label {
- float: left;
- width: 25%;
- padding-top: 3px;
- margin-bottom: 5px;
- }
-#contactForm input, textarea {
- width: 70%;
- margin-right: 10px;
- margin-bottom: 5px;
- }
--->
-</style>
<div>
-<h3>Contact me</h3>
+<h2>Contact me</h2>
<div style="display:block;">$contact_error_message</div>
<form name="contactForm" id="contactForm" method="post" action="$base_url$contact_urltrigger">
<label for="name" title="Your name">Name</label>
@@ -270,8 +255,9 @@ def _handle_post(request):
parser.feed(form[field].value)
email[field] = parser.gettext()
- if 'email' in form and not isAddressValid(form['email'].value):
- error_messages.append("Invalid email address '%s'. Cannot deliver your message!" % form['email'].value)
+ if 'email' in email.keys() and not isAddressValid(email['email']):
+ error = True
+ error_messages.append("Invalid email address '%s'. Cannot deliver your message!" % email['email'])
if error:
data[MESSAGE_KEY] = "<br />\n".join(error_messages)