Skip to content

Commit

Permalink
Change submit button name
Browse files Browse the repository at this point in the history
This causes problems when used with recaptcha, see #1504
  • Loading branch information
rolandgeider committed Nov 26, 2023
1 parent c9e9630 commit 1dbdeb0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions wger/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class UserEmailForm(forms.ModelForm):

class Meta:
model = User
fields = ('email', )
fields = ('email',)

def clean_email(self):
"""
Expand Down Expand Up @@ -263,13 +263,15 @@ def __init__(self, *args, **kwargs):
self.helper = FormHelper()
self.helper.form_class = 'wger-form'
self.helper.layout = Layout(
'username', 'email',
'username',
'email',
Row(
Column('password1', css_class='col-md-6 col-12'),
Column('password2', css_class='col-md-6 col-12'),
css_class='form-row'
), 'captcha',
ButtonHolder(Submit('submit', _("Register"), css_class='btn-success btn-block'))
),
'captcha',
ButtonHolder(Submit('submitBtn', _("Register"), css_class='btn-success btn-block'))
)


Expand All @@ -283,7 +285,8 @@ def __init__(self, *args, **kwargs):
self.helper = FormHelper()
self.helper.form_class = 'wger-form'
self.helper.layout = Layout(
'username', 'email',
'username',
'email',
Row(
Column('password1', css_class='col-md-6 col-12'),
Column('password2', css_class='col-md-6 col-12'),
Expand Down

0 comments on commit 1dbdeb0

Please sign in to comment.