equal
deleted
inserted
replaced
462 self.w(u'</div>') |
462 self.w(u'</div>') |
463 |
463 |
464 |
464 |
465 class LogForm(forms.FieldsForm): |
465 class LogForm(forms.FieldsForm): |
466 __regid__ = 'logform' |
466 __regid__ = 'logform' |
|
467 domid = 'loginForm' |
467 # XXX have to recall fields name since python is mangling __login/__password |
468 # XXX have to recall fields name since python is mangling __login/__password |
468 __login = ff.StringField('__login', widget=fw.TextInput({'class': 'data'})) |
469 __login = ff.StringField('__login', widget=fw.TextInput({'class': 'data'})) |
469 __password = ff.StringField('__password', label=_('password'), |
470 __password = ff.StringField('__password', label=_('password'), |
470 widget=fw.PasswordSingleInput({'class': 'data'})) |
471 widget=fw.PasswordSingleInput({'class': 'data'})) |
471 form_buttons = [fw.SubmitButton(label=_('log in'), |
472 form_buttons = [fw.SubmitButton(label=_('log in'), |
506 if cw.vreg.config['allow-email-login']: |
507 if cw.vreg.config['allow-email-login']: |
507 label = cw._('login or email') |
508 label = cw._('login or email') |
508 else: |
509 else: |
509 label = cw._('login') |
510 label = cw._('login') |
510 form.field_by_name('__login').label = label |
511 form.field_by_name('__login').label = label |
511 self.w(form.render(table_class='')) |
512 self.w(form.render(table_class='', display_progress_div=False)) |
512 cw.html_headers.add_onload('jQuery("#__login:visible").focus()') |
513 cw.html_headers.add_onload('jQuery("#__login:visible").focus()') |
513 |
514 |
514 def login_form_url(req): |
515 def login_form_url(req): |
515 if req.https: |
516 if req.https: |
516 return req.url() |
517 return req.url() |