Skip to content
Browse files

omit p tag in subscriber portlet if no description is given and use r…

…adio buttons für gender selection
  • Loading branch information...
1 parent 059e971 commit ac9b63e3e625706f0ed8f39e5d762b551fa9707c @MrTango MrTango committed Mar 28, 2012
View
26 Products/EasyNewsletter/portlets/subscriber.pt
@@ -8,25 +8,31 @@
</dt>
<dd class="portletItem lastItem">
- <p tal:content="view/description|nothing">Portlet Description</p>
+ <p tal:content="view/description|nothing"
+ tal:omit-tag="not:view/description"/>
<form action="@@register-subscriber">
<input type="hidden"
name="newsletter"
value="newsletter"
tal:attributes="value view/get_newsletter" />
- <select tal:condition="view/data/query_fullname|nothing"
- class="easynewsletter_text"
+ <div id="salutation"
+ tal:condition="view/data/query_fullname|nothing"
id="salutation"
name="salutation">
- <option value=""
- i18n:translate="">Choose salutation...</option>
- <option value="ms"
- i18n:translate="">Ms.</option>
- <option value="mr"
- i18n:translate="">Mr.</option>
- </select>
+ <input
+ type="radio"
+ name="salutation"
+ value="ms"
+ checked="checked"
+ i18n:translate=""> Ms.
+ <input
+ type="radio"
+ name="salutation"
+ value="mr"
+ i18n:translate=""> Mr.
+ </div>
<input class="easynewsletter_text"
onclick="this.value=''"
View
4 Products/EasyNewsletter/portlets/subscriber.py
@@ -111,8 +111,8 @@ def create(self, data):
"""
"""
return Assignment(
- portlet_title = data.get("portlet_title", ""),
- portlet_description = data.get("portlet_description", ""),
+ portlet_title = data.get("portlet_title", u""),
+ portlet_description = data.get("portlet_description", u""),
newsletter = data.get("newsletter", ""),
)
View
2 Products/EasyNewsletter/profiles/default/types/EasyNewsletter.xml
@@ -2,7 +2,7 @@
<object name="EasyNewsletter"
meta_type="Factory-based Type Information with dynamic views"
i18n:domain="EasyNewsletter" xmlns:i18n="http://xml.zope.org/namespaces/i18n">
- <property name="title" i18n:translate="">EasyNewsletter</property>
+ <property name="title" i18n:translate="">Newsletter</property>
<property name="description"
i18n:translate="">An easy to use Newsletter</property>
<property name="content_icon">document_icon.gif</property>

0 comments on commit ac9b63e

Please sign in to comment.
Something went wrong with that request. Please try again.