Compare commits

..

2 commits

Author SHA1 Message Date
deflax 35235aa29c move div 2024-04-05 15:34:57 +03:00
deflax ca630e4f11 remove cyrillic strings 2024-04-05 15:33:34 +03:00
3 changed files with 10 additions and 15 deletions

View file

@ -26,23 +26,23 @@ class EditProfileForm(FlaskForm):
submit = SubmitField('Update')
class EditProfileAdminForm(FlaskForm):
email = StringField('Електроннa поща (логин):', [validators.DataRequired(), validators.Length(1, 64), validators.Email()])
email = StringField('Email login address:', [validators.DataRequired(), validators.Length(1, 64), validators.Email()])
confirmed = BooleanField('Activated')
role = SelectField('Role', coerce=int)
name = StringField('Лице за контакт:', [validators.DataRequired(), validators.Length(3, 60)])
address = StringField('Адрес:', [validators.DataRequired(), validators.Length(2, 50)])
city = StringField('Град:', [validators.DataRequired(), validators.Length(2,40)])
postcode = DecimalField('Пощенски Код:')
name = StringField('Contact name:', [validators.DataRequired(), validators.Length(3, 60)])
address = StringField('Address:', [validators.DataRequired(), validators.Length(2, 50)])
city = StringField('City:', [validators.DataRequired(), validators.Length(2,40)])
postcode = DecimalField('Postcode:')
clist = []
for c in countries:
clist.append((c.alpha2, c.name))
country = SelectField('Държава:', choices=clist)
country = SelectField('Country:', choices=clist)
phone = DecimalField('Телефон:', [validators.DataRequired()])
phone = DecimalField('Phone:', [validators.DataRequired()])
twofactor = BooleanField('2-factor authentication')
submit = SubmitField('Обнови')
submit = SubmitField('Renew')
def __init__(self, user, *args, **kwargs):
super(EditProfileAdminForm, self).__init__(*args, **kwargs)
@ -52,6 +52,6 @@ class EditProfileAdminForm(FlaskForm):
def validate_email(self, field):
if field.data != self.user.email and User.query.filter_by(email=field.data).first():
raise ValidationError('Email-а е вече регистриран.')
raise ValidationError('The mail address is already registered.')

View file

@ -26,7 +26,7 @@ def profile():
current_user.twofactor = form.twofactor.data
db.session.add(current_user)
db.session.commit()
flash('Info Updated!')
flash('Profile info Updated!')
form.name.data = current_user.name
form.address.data = current_user.address

View file

@ -67,7 +67,6 @@
</div>
</div>
</div>
</div>
</div>
@ -94,10 +93,6 @@
</p>
</div>
</div>
</div>