def _create_form(request): _ = request.getText url = request.page.url(request) ret = html.FORM(action=url) ret.append( html.INPUT(type='hidden', name='action', value='CreateNewAccount')) lang_attr = request.theme.ui_lang_attr() ret.append(html.Raw('<div class="userpref"%s>' % lang_attr)) tbl = html.TABLE(border="0") ret.append(tbl) ret.append(html.Raw('</div>')) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append(html.Text(_("Name"))))) cell = html.TD() row.append(cell) cell.append(html.INPUT(type="text", size="36", name="name")) cell.append(html.Text(' ' + _("(Use FirstnameLastname)"))) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append(html.Text( _("Password"))))) row.append(html.TD().append( html.INPUT(type="password", size="36", name="password1"))) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append( html.Text(_("Password repeat"))))) row.append(html.TD().append( html.INPUT(type="password", size="36", name="password2"))) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append(html.Text(_("Email"))))) row.append(html.TD().append( html.INPUT(type="text", size="36", name="email"))) textcha = TextCha(request) if textcha.is_enabled(): row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append( html.Text(_('TextCha (required)'))))) td = html.TD() if textcha: td.append(textcha.render()) row.append(td) row = html.TR() tbl.append(row) row.append(html.TD()) td = html.TD() row.append(td) td.append( html.INPUT(type="submit", name="create", value=_('Create Profile'))) return unicode(ret)
def _create_form(request): _ = request.getText url = request.page.url(request) ret = html.FORM(action=url) ret.append(html.INPUT(type='hidden', name='action', value='newaccount')) lang_attr = request.theme.ui_lang_attr() ret.append(html.Raw('<div class="userpref"%s>' % lang_attr)) tbl = html.TABLE(border="0") ret.append(tbl) ret.append(html.Raw('</div>')) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append( html.Text(_("Name"))))) cell = html.TD() row.append(cell) cell.append(html.INPUT(type="text", size="36", name="name")) cell.append(html.Text(' ' + _("(Use FirstnameLastname)"))) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append( html.Text(_("Password"))))) row.append(html.TD().append(html.INPUT(type="password", size="36", name="password1"))) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append( html.Text(_("Password repeat"))))) row.append(html.TD().append(html.INPUT(type="password", size="36", name="password2"))) row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append(html.Text(_("Email"))))) row.append(html.TD().append(html.INPUT(type="text", size="36", name="email"))) textcha = TextCha(request) if textcha.is_enabled(): row = html.TR() tbl.append(row) row.append(html.TD().append(html.STRONG().append( html.Text(_('TextCha (required)'))))) td = html.TD() if textcha: td.append(textcha.render()) row.append(td) row = html.TR() tbl.append(row) row.append(html.TD()) td = html.TD() row.append(td) td.append(html.INPUT(type="submit", name="create", value=_('Create Profile'))) return unicode(ret)