Skip to content
Snippets Groups Projects
Commit 0a1ea20d authored by DarkGod's avatar DarkGod
Browse files

Fixed an issue preventing users with a too long password from login in. Sorry :/

parent 746bc751
No related branches found
No related tags found
No related merge requests found
......@@ -231,8 +231,8 @@ function _M:uiLogin(uis)
local str = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile"}
local bt = Button.new{text="Login", width=50, fct=function() self:login() end}
local btr = Button.new{text="Register", fct=function() self:register() end}
self.c_login = Textbox.new{title="Username: ", text="", chars=16, max_len=20, fct=function(text) self:login() end}
self.c_pass = Textbox.new{title="Password: ", size_title=self.c_login.title, text="", chars=16, max_len=20, hide=true, fct=function(text) self:login() end}
self.c_login = Textbox.new{title="Username: ", text="", chars=16, max_len=200, fct=function(text) self:login() end}
self.c_pass = Textbox.new{title="Password: ", size_title=self.c_login.title, text="", chars=16, max_len=200, hide=true, fct=function(text) self:login() end}
uis[#uis+1] = {left=10, bottom=bt.h + self.c_login.h + self.c_pass.h + str.h, ui=Separator.new{dir="vertical", size=self.iw - 20}}
uis[#uis+1] = {hcenter=0, bottom=bt.h + self.c_login.h + self.c_pass.h, ui=str}
......
......@@ -46,8 +46,8 @@ function _M:init(dialogdef, profile_help_text)
end
if self.justlogin then
self.c_login = Textbox.new{title="Username: ", text="", chars=30, max_len=20, fct=function(text) self:okclick() end}
self.c_pass = Textbox.new{title="Password: ", text="", chars=30, max_len=20, hide=true, fct=function(text) self:okclick() end}
self.c_login = Textbox.new{title="Username: ", text="", chars=30, max_len=200, fct=function(text) self:okclick() end}
self.c_pass = Textbox.new{title="Password: ", text="", chars=30, max_len=200, hide=true, fct=function(text) self:okclick() end}
local ok = require("engine.ui.Button").new{text="Login", fct=function() self:okclick() end}
local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end}
......@@ -62,9 +62,9 @@ function _M:init(dialogdef, profile_help_text)
else
local pwa = "Password again: "
self.c_login = Textbox.new{title="Username: ", size_title=pwa, text="", chars=30, max_len=20, filter=login_filter, fct=function(text) self:okclick() end}
self.c_pass = Textbox.new{title="Password: ", size_title=pwa, text="", chars=30, max_len=20, hide=true, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_pass2 = Textbox.new{title=pwa, text="", size_title=pwa, chars=30, max_len=20, hide=true, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_email = Textbox.new{title="Email: ", size_title=pwa, text="", chars=30, max_len=60, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_pass = Textbox.new{title="Password: ", size_title=pwa, text="", chars=30, max_len=40, hide=true, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_pass2 = Textbox.new{title=pwa, text="", size_title=pwa, chars=30, max_len=40, hide=true, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_email = Textbox.new{title="Email: ", size_title=pwa, text="", chars=30, max_len=80, filter=pass_filter, fct=function(text) self:okclick() end}
self.c_news = Checkbox.new{title="Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails about important game events from us.", default=false, fct=function() self:okclick() end}
self.c_age = Checkbox.new{title="You at least 16 years old, or have parental authorization to play the game.", default=false, fct=function() self:okclick() end}
local ok = require("engine.ui.Button").new{text="Create", fct=function() self:okclick() end}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment