@Override
public void onRender()
{
setHeader( localize( "header.registration" ) );
Form form = new Form( REGISTRATION_FORM, Account.class );
add( form );
FieldSet loginInfo = new FieldSet( localize( "title.loginInfo" ) );
form.add( loginInfo );
loginInfo.add( new FormRow( localize( "label.loginProvider" ), new Select<LoginProvider>( "loginProvider", LoginProvider.class.getEnumConstants(), new EnumChoiceRenderer() ) ) );
loginInfo.add( new FormRow( localize( "label.email" ), new TextBox( "email" ) ) );
loginInfo.add( new FormRow( localize( "label.login" ), new TextBox( "login" ) ) );
loginInfo.add( new FormRow( localize( "label.password" ), new TextBox( "password" ) ) );
loginInfo.add( new FormRow( localize( "label.passwordAgain" ), new TextBox( "passwordAgain" ) ) );
FieldSet additionalInfo = new FieldSet( localize( "title.additionalInfo" ) );
form.add( additionalInfo );
additionalInfo.add( new FormRow( localize( "label.name" ), new TextBox( "name" ) ) );
additionalInfo.add( new FormRow( localize( "label.surname" ), new TextBox( "surname" ) ) );
additionalInfo.add( new FormRow( localize( "label.notify" ), new CheckBox( "notify" ) ) );
// TODO: captcha
form.add( new AjaxSubmitButton( "save", localize( "button.register" ) ) );
}