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 = WebFormHelper::createWebFormHelper($this, 'shipsimu_user_login');
7 // Formular deaktiviert?
8 if ($helperInstance->ifLoginIsEnabled()) {
10 $helperInstance->addFormGroup('login', "Gebe hier deine Logindaten ein:");
12 // Welches Loginverfahren wurde konfiguriert?
13 if ($helperInstance->ifLoginWithUsername()) {
15 $helperInstance->addFormSubGroup('username', "Bitte mit deinem Nickname einloggen.");
16 $helperInstance->addFieldText('username', "Dein Nickname:");
17 $helperInstance->addInputTextField('username');
18 } elseif ($helperInstance->ifLoginWithEmail()) {
20 $helperInstance->addFormSubGroup('email', "Bitte mit deiner Email-Adresse einloggen.");
21 $helperInstance->addFieldText('email', "Deine Email-Addresse:");
22 $helperInstance->addInputTextField('email');
24 // Login mit Email/Username
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 $helperInstance->addFormSubGroup('pass', "Gebe dein Passwort von der Anmeldung ein.");
31 $helperInstance->addFieldText('pass', "Dein Passwort:");
32 $helperInstance->addInputPasswordField('pass');
35 if ($helperInstance->ifFormSecuredWithCaptcha()) {
36 $helperInstance->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
37 $helperInstance->addCaptcha();
41 $helperInstance->addFormGroup('buttons_user', "Alles richtig eingegeben?");
42 $helperInstance->addInputResetButton("Formular leeren");
43 $helperInstance->addInputSubmitButton("Zum Spiel einloggen");
45 // Formular deaktiviert
46 $helperInstance->addFormNote('form_deactivated', "Einloggen in's Spiel ist derzeit administrativ deaktiviert worden. Bitte komme später noch mal wieder.");
47 $helperInstance->addFormNote('admin_notice', "Nachricht vom Admin: <span id=\"disabled_reason\">".$this->getConfigInstance()->readConfig('login_disabled_reason')."</span>");
50 // Formular schliessen
51 $helperInstance->flushContent();
53 // Ist Gastlogin erlaubt?
54 if ($helperInstance->ifGuestLoginAllowed()) {
55 // Neue Helper-Instanz holen
56 $helperInstance = WebFormHelper::createWebFormHelper($this, 'shipsimu_guest_login');
57 $helperInstance->addInputHiddenConfiguredField('user', 'guest_login');
58 $helperInstance->addInputHiddenConfiguredField('passwd', 'guest_login');
61 if ($helperInstance->ifFormSecuredWithCaptcha()) {
62 $helperInstance->addFormGroup('captcha_guest', "Unser Gast-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
63 $helperInstance->addCaptcha();
67 $helperInstance->addFormGroup('buttons_guest', "Gastlogins sind in der Funkionsweise eingeschränkt. Mehr dazu unter "Gastlogin".");
68 $helperInstance->addInputSubmitButton("Als Gast einloggen");
69 $helperInstance->flushContent();
72 // Get helper instance
73 $helperInstance = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register');
76 $helperInstance->addLinkWithTextById('register_login_form_link_text');
79 $helperInstance->flushContent();
82 <div id="content_header">
83 Einloggen zu <span class="app_name">{?app_full_name?}</span>
86 <div id="content_body">
88 {?shipsimu_user_login?}
91 <div id="guest_login">
92 {?shipsimu_guest_login?}
96 <div id="content_footer">
97 Noch kein Spieleaccount? {?register_login_form_link?}