2 // Get helper instance for web forms. This will add the opening form-tag to
3 // the helper's render cache which is simply a small variable in the class
5 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_user_login'));
7 // Is the form enabled?
8 if ($helperInstance->ifLoginIsEnabled()) {
10 $helperInstance->addFormGroup('login', "Gebe hier deine Logindaten ein:");
12 // Which login method has been configured?
13 if ($helperInstance->ifLoginWithUsername()) {
14 // Login with user name only
15 $helperInstance->addFormSubGroup('username', "Bitte mit deinem Nickname einloggen.");
16 $helperInstance->addFieldText('username', "Dein Nickname:");
17 $helperInstance->addInputTextField('username');
18 } elseif ($helperInstance->ifLoginWithEmail()) {
19 // Login with email address only
20 $helperInstance->addFormSubGroup('email', "Bitte mit deiner Email-Adresse einloggen.");
21 $helperInstance->addFieldText('email', "Deine Email-Addresse:");
22 $helperInstance->addInputTextField('email');
24 // Login with email address or user name
25 $helperInstance->addFormSubGroup('user_email', "Bitte mit deinem Nickname oder Email-Adresse einloggen.");
26 $helperInstance->addFieldText('user_email', "Dein Nickname/Email:");
27 $helperInstance->addInputTextField('user_email');
30 // Add password input field
31 $helperInstance->addFormSubGroup('pass', "Gebe dein Passwort von der Anmeldung ein.");
32 $helperInstance->addFieldText('pass', "Dein Passwort:");
33 $helperInstance->addInputPasswordField('pass');
36 if ($helperInstance->ifFormSecuredWithCaptcha()) {
37 $helperInstance->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
38 $helperInstance->addCaptcha();
42 $helperInstance->addFormGroup('buttons_user', "Alles richtig eingegeben?");
43 $helperInstance->addInputResetButton("Formular leeren");
44 $helperInstance->addInputSubmitButton("Zum Spiel einloggen");
47 $helperInstance->addFormNote('form_deactivated', "Einloggen in's Spiel ist derzeit administrativ deaktiviert worden. Bitte komme später noch mal wieder.");
48 $helperInstance->addFormNote('admin_notice', "Nachricht vom Admin: <span id=\"disabled_reason\">".$this->getConfigInstance()->readConfig('login_disabled_reason')."</span>");
51 // Formular schliessen
52 $helperInstance->flushContent();
54 // Ist Gastlogin erlaubt?
55 if ($helperInstance->ifGuestLoginAllowed()) {
56 // Neue Helper-Instanz holen
57 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_guest_login'));
58 $helperInstance->addInputHiddenConfiguredField('user', 'guest_login');
59 $helperInstance->addInputHiddenConfiguredField('passwd', 'guest_login');
62 if ($helperInstance->ifFormSecuredWithCaptcha()) {
63 $helperInstance->addFormGroup('captcha_guest', "Unser Gast-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
64 $helperInstance->addCaptcha();
68 $helperInstance->addFormGroup('buttons_guest', "Gastlogins sind in der Funkionsweise eingeschränkt. Mehr dazu unter "Gastlogin".");
69 $helperInstance->addInputSubmitButton("Als Gast einloggen");
70 $helperInstance->flushContent();
73 // Get helper instance
74 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'register'));
77 $helperInstance->addLinkWithTextById('register_login');
80 $helperInstance->flushContent();
84 <div id="content_header">
85 Einloggen zu <span class="app_name">{?app_full_name?}</span>
88 <div id="content_body">
93 <div id="guest_login">
98 <div id="content_footer">
99 Noch kein Spieleaccount? {?register?}