Fixes in usermodel
This commit is contained in:
parent
662ffb0a82
commit
1dca7a3f43
2 changed files with 4 additions and 2 deletions
|
|
@ -30,6 +30,8 @@ class UserModel(WebModel):
|
||||||
|
|
||||||
repeat_password.label=I18n.lang('common', 'repeat_password', 'Repeat Password')
|
repeat_password.label=I18n.lang('common', 'repeat_password', 'Repeat Password')
|
||||||
|
|
||||||
|
repeat_password.field=self.fields['password']
|
||||||
|
|
||||||
self.create_form_after(self.password_field, repeat_password)
|
self.create_form_after(self.password_field, repeat_password)
|
||||||
"""
|
"""
|
||||||
def insert(self, dict_values, external_agent=True):
|
def insert(self, dict_values, external_agent=True):
|
||||||
|
|
@ -116,7 +118,7 @@ class UserModel(WebModel):
|
||||||
self.conditions[0]+=' AND '+self.name_field_id+'!=%s'
|
self.conditions[0]+=' AND '+self.name_field_id+'!=%s'
|
||||||
self.conditions[1].append(get_id)
|
self.conditions[1].append(get_id)
|
||||||
|
|
||||||
print(self.conditions[0])
|
|
||||||
if self.select_count()>0:
|
if self.select_count()>0:
|
||||||
|
|
||||||
self.fields[self.username_field].error=True
|
self.fields[self.username_field].error=True
|
||||||
|
|
|
||||||
|
|
@ -828,7 +828,7 @@ class PhangoField:
|
||||||
value=WebModel.escape_sql(value)
|
value=WebModel.escape_sql(value)
|
||||||
|
|
||||||
if value=="":
|
if value=="":
|
||||||
self.txt_error="The field is in blank"
|
self.txt_error="The field is empty"
|
||||||
self.error=True
|
self.error=True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue