[CMF-checkins] SVN: CMF/trunk/CMFDefault/skins/zpt_ - some minor
form tweaking
Yvo Schubbe
y.2006_ at wcm-solutions.de
Mon Feb 20 06:28:01 EST 2006
Log message for revision 41711:
- some minor form tweaking
Changed:
U CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py
U CMF/trunk/CMFDefault/skins/zpt_content/document_edit_template.pt
U CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt
U CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt
U CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_template.pt
U CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_template.pt
U CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_template.pt
U CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_template.pt
U CMF/trunk/CMFDefault/skins/zpt_generic/zpt_stylesheet.css
-=-
Modified: CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_content/document_edit_form.py 2006-02-20 11:28:00 UTC (rev 41711)
@@ -1,6 +1,7 @@
##parameters=change='', change_and_view=''
##
from Products.CMFDefault.utils import decode
+from Products.CMFDefault.utils import html_marshal
from Products.CMFDefault.utils import Message as _
form = context.REQUEST.form
@@ -20,17 +21,20 @@
options = {}
-options['SafetyBelt'] = form.get('SafetyBelt', context.SafetyBelt())
options['title'] = context.Title()
options['description'] = context.Description()
options['text_format'] = form.get('text_format', context.text_format)
options['text'] = form.get('text', context.EditableBody())
+SafetyBelt = form.get('SafetyBelt', context.SafetyBelt())
+hidden_vars = [ {'name': n, 'value': v}
+ for n, v in html_marshal(SafetyBelt=SafetyBelt) ]
buttons = []
target = context.getActionInfo('object/edit')['url']
buttons.append( {'name': 'change', 'value': _(u'Change')} )
buttons.append( {'name': 'change_and_view', 'value': _(u'Change and View')} )
options['form'] = { 'action': target,
+ 'listHiddenVarInfos': tuple(hidden_vars),
'listButtonInfos': tuple(buttons) }
return context.document_edit_template(**decode(options, script))
Modified: CMF/trunk/CMFDefault/skins/zpt_content/document_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/document_edit_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_content/document_edit_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -11,9 +11,8 @@
<div class="Desktop">
<form action="document_edit_form" method="post" enctype="multipart/form-data"
- tal:attributes="action form/action">
- <input type="hidden" name="SafetyBelt" value=""
- tal:attributes="value options/SafetyBelt" />
+ tal:attributes="action form/action"
+><metal:macro metal:use-macro="context/form_widgets/macros/hidden_vars" />
<table class="FormLayout">
<tr>
<th i18n:translate="">Title</th>
@@ -27,26 +26,25 @@
<th i18n:translate="">Format</th>
<td>
<input type="radio" name="text_format" value="structured-text" id="cb_stx"
- tal:attributes="
- checked python:path('options/text_format')=='structured-text'" />
+ tal:attributes="checked python: options['text_format']=='structured-text'" />
<label for="cb_stx" i18n:translate="">structured-text</label>
<input type="radio" name="text_format" value="plain" id="cb_plain"
- tal:attributes="checked python:path('options/text_format')=='plain'" />
+ tal:attributes="checked python: options['text_format']=='plain'" />
<label for="cb_plain" i18n:translate="">plain text</label>
<input type="radio" name="text_format" value="html" id="cb_html"
- tal:attributes="checked python:path('options/text_format')=='html'" />
+ tal:attributes="checked python: options['text_format']=='html'" />
<label for="cb_html" i18n:translate="">html</label>
</td>
</tr>
<tr>
<th i18n:translate="">Upload</th>
<td>
- <input type="file" name="file" size="25" />
+ <input type="file" name="file" size="40" />
</td>
</tr>
<tr>
- <th class="TextField" i18n:translate="">Edit</th>
- <td class="TextField">
+ <th i18n:translate="">Edit</th>
+ <td>
<textarea name="text:text" rows="20" cols="80" wrap="soft"
tal:content="options/text"></textarea>
</td>
Modified: CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_content/folder_edit_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -16,14 +16,14 @@
<tr>
<th i18n:translate="">Title</th>
<td>
- <input type="text" name="title" value="" size="65"
+ <input type="text" name="title" value="" size="80"
tal:attributes="value options/title" />
</td>
</tr>
<tr>
<th i18n:translate="">Description</th>
<td>
- <textarea name="description:text" rows="5" cols="65" wrap="soft"
+ <textarea name="description:text" rows="3" cols="80" wrap="soft"
tal:content="options/description"></textarea>
</td>
</tr>
Modified: CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_content/full_metadata_edit_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -29,34 +29,31 @@
</select>
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Identifier</th>
+ <tr>
+ <th i18n:translate="">Identifier</th>
<td colspan="3">
<tal:span tal:content="options/identifier" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Title</th>
+ <tr>
+ <th i18n:translate="">Title</th>
<td colspan="3">
- <input type="text"
- name="title"
- value=""
- size="65"
- tal:attributes="value options/title" />
+ <input type="text" name="title" value="" size="80"
+ tal:attributes="value options/title" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Description</th>
+ <tr>
+ <th i18n:translate="">Description</th>
<td colspan="3">
- <textarea name="description:text" rows="5" cols="65" wrap="soft"
+ <textarea name="description:text" rows="3" cols="80" wrap="soft"
tal:content="options/description"></textarea>
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Subject</th>
+ <tr>
+ <th i18n:translate="">Subject</th>
<td tal:define="subj_lines python: '\n'.join(options['extra_subjects'])">
- <textarea name="subject:lines" rows="3" cols="20"
- tal:content="subj_lines"></textarea>
+ <textarea name="subject:lines" rows="3" cols="31"
+ tal:content="subj_lines"></textarea>
<br />
<select name="subject:list" multiple>
<option value=""
@@ -67,49 +64,49 @@
</option>
</select>
</td>
- <th align="right" i18n:translate="">Contributors</th>
+ <th i18n:translate="">Contributors</th>
<td tal:define="contrib_lines python: '\n'.join(options['contributors'])">
- <textarea name="contributors:lines" rows="5" cols="30"
- tal:content="contrib_lines"></textarea>
+ <textarea name="contributors:lines" rows="5" cols="31"
+ tal:content="contrib_lines"></textarea>
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Creation Date</th>
- <td> <span tal:replace="context/CreationDate"></span>
- </td>
- <th align="right" i18n:translate="">Last Modified Date</th>
- <td> <span tal:replace="context/ModificationDate"></span>
- </td>
+ <tr>
+ <th i18n:translate="">Creation Date</th>
+ <td tal:content="context/CreationDate"></td>
+ <th i18n:translate="">Last Modified Date</th>
+ <td tal:content="context/ModificationDate"></td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Effective Date</th>
+ <tr>
+ <th i18n:translate="">Effective Date</th>
<td>
<input type="text" name="effective_date" value=""
- tal:attributes="value context/EffectiveDate" />
+ tal:attributes="value context/EffectiveDate" />
</td>
- <th align="right" i18n:translate="">Expiration Date</th>
+ <th i18n:translate="">Expiration Date</th>
<td>
<input type="text" name="expiration_date" value=""
- tal:attributes="value context/ExpirationDate" />
+ tal:attributes="value context/ExpirationDate" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Format</th>
- <td>
+ <tr>
+ <th i18n:translate="">Format</th>
+ <td colspan="3">
<input type="text" name="format" value=""
tal:attributes="value options/format" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Language</th>
- <td> <input type="text" name="language" value=""
- tal:attributes="value options/language" />
+ <tr>
+ <th i18n:translate="">Language</th>
+ <td colspan="3">
+ <input type="text" name="language" value=""
+ tal:attributes="value options/language" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Rights</th>
- <td> <input type="text" name="rights" value=""
- tal:attributes="value options/rights" />
+ <tr>
+ <th i18n:translate="">Rights</th>
+ <td colspan="3">
+ <input type="text" name="rights" value=""
+ tal:attributes="value options/rights" />
</td>
</tr>
<tr>
Modified: CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_content/metadata_edit_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -16,7 +16,7 @@
<tr>
<th i18n:translate="">Enable Discussion?</th>
<td>
- <select name="allow_discussion">
+ <select name="allow_discussion" style="float: left">
<option value="default"
tal:attributes="selected python: options['allow_discussion'] is None"
i18n:translate="">Default</option>
@@ -27,42 +27,37 @@
tal:attributes="selected python: options['allow_discussion'] is True"
i18n:translate="">On</option>
</select>
- </td>
- <td colspan="2" align="right">
- <a href="full_metadata_edit_form"
+ <a href="full_metadata_edit_form" style="float: right"
tal:attributes="href string:${context/absolute_url}/full_metadata_edit_form"
i18n:translate=""
>Edit all metadata</a>
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Identifier</th>
- <td colspan="3">
+ <tr>
+ <th i18n:translate="">Identifier</th>
+ <td>
<tal:span tal:content="options/identifier" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Title</th>
- <td colspan="3">
- <input type="text"
- name="title"
- value=""
- size="65"
- tal:attributes="value options/title" />
+ <tr>
+ <th i18n:translate="">Title</th>
+ <td>
+ <input type="text" name="title" value="" size="80"
+ tal:attributes="value options/title" />
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Description</th>
- <td colspan="3">
- <textarea name="description:text" rows="5" cols="65" wrap="soft"
+ <tr>
+ <th i18n:translate="">Description</th>
+ <td>
+ <textarea name="description:text" rows="3" cols="80" wrap="soft"
tal:content="options/description"></textarea>
</td>
</tr>
- <tr valign="top">
- <th align="right" i18n:translate="">Subject</th>
+ <tr>
+ <th i18n:translate="">Subject</th>
<td tal:define="subj_lines python: '\n'.join(options['extra_subjects'])">
- <textarea name="subject:lines" rows="3" cols="20"
- tal:content="subj_lines"></textarea>
+ <textarea name="subject:lines" rows="3" cols="31"
+ tal:content="subj_lines"></textarea>
<br />
<select name="subject:list" multiple>
<option value=""
@@ -73,7 +68,9 @@
</option>
</select>
</td>
- <th align="right" i18n:translate="">Format</th>
+ </tr>
+ <tr>
+ <th i18n:translate="">Format</th>
<td>
<input type="text" name="format" value=""
tal:attributes="value options/format" />
@@ -81,7 +78,7 @@
</tr>
<tr>
<td> </td>
- <td colspan="3">
+ <td>
<metal:macro metal:use-macro="context/form_widgets/macros/buttons" />
</td>
</tr>
Modified: CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_content/newsitem_edit_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -21,28 +21,27 @@
<th i18n:translate="">Format</th>
<td>
<input type="radio" name="text_format" value="structured-text" id="cb_stx"
- tal:attributes="
- checked python:path('options/text_format')=='structured-text'" />
+ tal:attributes="checked python: options['text_format']=='structured-text'" />
<label for="cb_stx" i18n:translate="">structured-text</label>
<input type="radio" name="text_format" value="plain" id="cb_plain"
- tal:attributes="checked python:path('options/text_format')=='plain'" />
+ tal:attributes="checked python: options['text_format']=='plain'" />
<label for="cb_plain" i18n:translate="">plain text</label>
<input type="radio" name="text_format" value="html" id="cb_html"
- tal:attributes="checked python:path('options/text_format')=='html'" />
+ tal:attributes="checked python: options['text_format']=='html'" />
<label for="cb_html" i18n:translate="">html</label>
</td>
</tr>
<tr>
- <th class="TextField" i18n:translate="">Lead-in</th>
- <td class="TextField">
- <textarea name="description:text" rows="10" cols="65" wrap="soft"
+ <th i18n:translate="">Lead-in</th>
+ <td>
+ <textarea name="description:text" rows="8" cols="80" wrap="soft"
tal:content="options/description"></textarea>
</td>
</tr>
<tr>
- <th class="TextField" i18n:translate="">Body</th>
- <td class="TextField">
- <textarea name="text:text" rows="20" cols="65" wrap="soft"
+ <th i18n:translate="">Body</th>
+ <td>
+ <textarea name="text:text" rows="16" cols="80" wrap="soft"
tal:content="options/text"></textarea>
</td>
</tr>
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/discussion_reply_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -15,13 +15,14 @@
<tr tal:condition="not:options/is_preview">
<th i18n:translate="">Subject (Title)</th>
<td>
- <input name="title" value="" tal:attributes="value options/title" />
+ <input type="text" name="title" value="" size="80"
+ tal:attributes="value options/title" />
</td>
</tr>
<tr tal:condition="not:options/is_preview">
<th i18n:translate="">Reply body</th>
<td>
- <textarea name="text" cols="70" rows="10" wrap="soft" style="width: 100%"
+ <textarea name="text" cols="80" rows="10" wrap="soft"
tal:content="options/text"></textarea>
</td>
</tr>
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_template.pt
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_template.pt 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/reconfig_template.pt 2006-02-20 11:28:00 UTC (rev 41711)
@@ -18,7 +18,7 @@
<tr>
<th i18n:translate="">Portal 'From' name</th>
<td>
- <input name="email_from_name" value=""
+ <input type="text" name="email_from_name" value="" size="40"
tal:attributes="value form/email_from_name" />
<dl class="FieldHelp">
<dd i18n:translate="">When the portal generates mail, it uses this name as
@@ -29,7 +29,7 @@
<tr>
<th i18n:translate="">Portal 'From' address</th>
<td>
- <input name="email_from_address" value=""
+ <input type="text" name="email_from_address" value="" size="40"
tal:attributes="value form/email_from_address" />
<dl class="FieldHelp">
<dd i18n:translate="">When the portal generates mail, it uses this address
@@ -40,7 +40,7 @@
<tr>
<th i18n:translate="">SMTP server</th>
<td>
- <input name="smtp_server" value=""
+ <input type="text" name="smtp_server" value="" size="40"
tal:attributes="value form/smtp_server" />
<dl class="FieldHelp">
<dd i18n:translate="">This is the address of your local SMTP (out-going
@@ -51,7 +51,8 @@
<tr>
<th i18n:translate="">Portal title</th>
<td>
- <input name="title" value="" tal:attributes="value form/title" />
+ <input type="text" name="title" value="" size="80"
+ tal:attributes="value form/title" />
<dl class="FieldHelp">
<dd i18n:translate="">This is the title which appears at the top of every
portal page.</dd>
@@ -60,9 +61,9 @@
</tr>
<tr>
<th i18n:translate="">Portal description</th>
- <td class="TextField">
- <textarea name="description" rows="6" cols="40" wrap="soft"
- tal:content="form/description"></textarea>
+ <td>
+ <textarea name="description:text" rows="3" cols="80" wrap="soft"
+ tal:content="form/description"></textarea>
<dl class="FieldHelp">
<dd i18n:translate="">This description is made available via syndicated
content and elsewhere. It should be fairly brief.</dd>
Modified: CMF/trunk/CMFDefault/skins/zpt_generic/zpt_stylesheet.css
===================================================================
--- CMF/trunk/CMFDefault/skins/zpt_generic/zpt_stylesheet.css 2006-02-20 11:23:12 UTC (rev 41710)
+++ CMF/trunk/CMFDefault/skins/zpt_generic/zpt_stylesheet.css 2006-02-20 11:28:00 UTC (rev 41711)
@@ -249,6 +249,7 @@
padding: 1pt 2pt 1pt 2pt;
width: 100px;
text-align: right;
+ vertical-align: top;
font-size: 80%;
font-weight: bold;
}
More information about the CMF-checkins
mailing list