64 mRegisterButton(
new Button(this,
_(
"Register"),
"register",
67 mCancelButton(
new Button(this,
_(
"Cancel"),
"cancel",
76 Label *
const userLabel =
new Label(
this,
_(
"Name:"));
78 Label *
const passwordLabel =
new Label(
this,
_(
"Password:"));
80 Label *
const confirmLabel =
new Label(
this,
_(
"Confirm:"));
84 placer(0, 0, userLabel, 1, 1);
85 placer(0, 1, passwordLabel, 1, 1);
86 placer(0, 2, confirmLabel, 1, 1);
109 Label *
const emailLabel =
new Label(
this,
_(
"Email:"));
116 placer(0, row, emailLabel, 1, 1);
162 const std::string &eventId =
event.getId();
163 if (eventId ==
"cancel")
167 else if (eventId ==
"register" &&
canSubmit())
170 logger->
log(
"RegisterDialog::register Username is %s", user.c_str());
172 std::string errorMsg;
180 if (user.length() < minUser)
185 (
_(
"The username needs to be at least %u characters long."),
189 else if (user.length() > maxUser - 1)
194 (
_(
"The username needs to be less than %u characters long."),
203 (
_(
"The password needs to be at least %u characters long."),
212 (
_(
"The password needs to be less than %u characters long."),
220 errorMsg =
_(
"Passwords do not match.");
227 errorMsg =
_(
"Incorrect email.");
234 errorMsg =
_(
"Email too long.");
254 _(
"Error"), errorMsg,
_(
"OK"),
static GenderT intToGender(const uint8_t sex) A_CONST
void setState(const StateT state)
int getIntValue(const std::string &key) const
void log(const char *const log_text,...)
virtual unsigned int getMinUserNameLength() const
virtual unsigned int getMaxPasswordLength() const
virtual unsigned int getMaxUserNameLength() const
virtual unsigned int getMinPasswordLength() const
virtual bool haveEmailOnRegister() const =0
TextField * mPasswordField
RadioButton * mMaleButton
WrongDataNoticeListener * mWrongDataNoticeListener
TextField * mConfirmField
void keyPressed(KeyEvent &event)
RegisterDialog(LoginData &loginData)
void action(const ActionEvent &event)
RadioButton * mFemaleButton
const std::string & getText() const
void setText(const std::string &text)
void setCaretPosition(unsigned int position)
ContainerPlacer getPlacer(const int x, const int y)
virtual void setVisible(Visible visible)
void reflowLayout(int w, int h)
void setCloseButton(const bool flag)
void setTarget(TextField *const textField)
Net::LoginHandler * loginHandler
const bool LoseFocusOnTab_true
bool error(InputEvent &event) __attribute__((noreturn))
Net::ServerFeatures * serverFeatures
const bool ShowCenter_true
std::string strprintf(const char *const format,...)