#409: Kid's formatting puts blank space in a textarea
---------------------+------------------------------------------------------
Reporter: kevin | Owner: anonymous
Type: defect | Status: reopened
Priority: normal | Milestone: 0.9
Component: Kid | Version:
Severity: normal | Resolution:
Keywords: develix |
---------------------+------------------------------------------------------
Comment (by [EMAIL PROTECTED]):
As requested I have attached a quickstarted project demoing broken
textareas. I don't know how to diff two directories, so this is what I
did:
1. Changed config/app.cfg to set xHTML output:
kid.outputformat="xhtml"
2. Added a test form to controllers.py:
{{{
[EMAIL PROTECTED]:~/textarea-demo/textareademo$ cat controllers.py
import cherrypy
import turbogears
from turbogears import controllers, expose, redirect
from turbogears import identity
from turbogears.widgets import *
class TestForm(WidgetsList):
ta = TextArea(label="Me broken:")
class Root(controllers.RootController):
@expose(template="textareademo.templates.welcome")
def index(self):
form = TableForm(fields=TestForm(), submit_text="Don't click me")
return dict(form=form)
}}}
3. Changed templates/welcome.kid to display the form:
{{{
[EMAIL PROTECTED]:~/textarea-demo/textareademo$ cat templates/welcome.kid
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#"
py:extends="'master.kid'">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"
py:replace="''"/>
<title>Welcome to TurboGears</title>
</head>
<body>
<p>Me broken:</p>
<div py:replace="form(action='/something')"></div>
</body>
</html>
[EMAIL PROTECTED]:~/textarea-demo/textareademo$
}}}
And the xHTML output is:
{{{
<form action="/something" method="post" class="tableform" name="form">
<table cellpadding="2" cellspacing="0" border="0">
<tr class="even">
<th>
<label class="fieldlabel" for="form_ta">Me
broken:</label>
</th>
<td>
<textarea id="form_ta" rows="7" cols="50" name="ta"
class="textarea">
</textarea>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" class="submitbutton" value="Don't
click me">
</input>
</td>
</tr>
</table>
</form>
}}}
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/409>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---