[CMF-checkins] CVS: CMF/CMFDefault/skins/content - newsitem_edit.py:1.3 newsitem_edit_form.dtml:1.5
Tres Seaver
tseaver@zope.com
Mon, 1 Apr 2002 13:17:15 -0500
Update of /cvs-repository/CMF/CMFDefault/skins/content
In directory cvs.zope.org:/tmp/cvs-serv11975/skins/content
Modified Files:
newsitem_edit.py newsitem_edit_form.dtml
Log Message:
- Add 'text_format' selection widget to NewsItem's edit forms (Tracker
#460).
=== CMF/CMFDefault/skins/content/newsitem_edit.py 1.2 => 1.3 ===
-##parameters=text, description, choice=' Change '
+##parameters=text, description, text_format=None, choice=' Change '
##title=Edit a news item
-context.edit(text, description)
+context.edit(text=text, description=description, text_format=text_format)
qst='portal_status_message=News+Item+changed.'
=== CMF/CMFDefault/skins/content/newsitem_edit_form.dtml 1.4 => 1.5 ===
<td> <dtml-var Title> </td>
</tr>
+
+ <tr>
+ <th>
+ Format
+ </th>
+ <td>
+ <input type="radio" name="text_format" value="structured-text"
+ <dtml-if "text_format=='structured-text'">checked</dtml-if>
+ id="cb_structuredtext" />
+ <label for="cb_structuredtext">structured-text</label>
+ <input type="radio" name="text_format" value="plain"
+ <dtml-if "text_format=='plain'">checked</dtml-if>
+ id="cb_html" />
+ <label for="cb_html">plain text</label>
+ <input type="radio" name="text_format" value="html"
+ <dtml-if "text_format=='html'">checked</dtml-if>
+ id="cb_html" />
+ <label for="cb_html">html</label>
+ </td>
+ </tr>
+
<tr>
<th class="TextField"> Lead-in </th>
<td class="TextField">
@@ -25,6 +46,7 @@
cols="65">&dtml-description;</textarea>
</td>
</tr>
+
<tr>
<th class="TextField"> Body
</th>
@@ -32,6 +54,7 @@
<textarea name="text:text" rows="20" cols="65">&dtml-EditableBody;</textarea>
</td>
</tr>
+
<tr>
<th> <br> </td>
<td>
@@ -39,6 +62,7 @@
<input type="submit" name="choice" value=" Change and View ">
</td>
</tr>
+
</table>
</form>