Merge branch 'master' of git.mxchange.org:/var/cache/git/repos/shipsimu
[shipsimu.git] / application / shipsimu / templates / de / code / login_form.ctp
1 <?php
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
4 // BaseHelper.
5 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'shipsimu_user_login'));
6
7 // Is the form enabled?
8 if ($helperInstance->ifLoginIsEnabled()) {
9         // Form is active
10         $helperInstance->addFormGroup('login', "Gebe hier deine Logindaten ein:");
11
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');
23         } else {
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');
28         }
29
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');
34
35         // CAPTCHA enabled?
36         if ($helperInstance->ifFormSecuredWithCaptcha()) {
37                 $helperInstance->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA gesch&uuml;tzt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
38                 $helperInstance->addCaptcha();
39         } // END - if
40
41         // Submit buttons
42         $helperInstance->addFormGroup('buttons_user', "Alles richtig eingegeben?");
43         $helperInstance->addInputResetButton("Formular leeren");
44         $helperInstance->addInputSubmitButton("Zum Spiel einloggen");
45 } else {
46         // Form is inactive
47         $helperInstance->addFormNote('form_deactivated', "Einloggen in&#39;s Spiel ist derzeit administrativ deaktiviert worden. Bitte komme sp&auml;ter noch mal wieder.");
48         $helperInstance->addFormNote('admin_notice', "Nachricht vom Admin: <span id=\"disabled_reason\">".$this->getConfigInstance()->readConfig('login_disabled_reason')."</span>");
49 }
50
51 // Formular schliessen
52 $helperInstance->flushContent();
53
54 // Ist Gastlogin erlaubt?
55 if ($helperInstance->ifGuestLoginAllowed()) {
56         // Neue Helper-Instanz holen
57         $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'shipsimu_guest_login'));
58         $helperInstance->addInputHiddenConfiguredField('user', 'guest_login');
59         $helperInstance->addInputHiddenConfiguredField('passwd', 'guest_login');
60
61         // CAPTCHA enbaled?
62         if ($helperInstance->ifFormSecuredWithCaptcha()) {
63                 $helperInstance->addFormGroup('captcha_guest', "Unser Gast-Login ist durch ein CAPTCHA gesch&uuml;tzt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
64                 $helperInstance->addCaptcha();
65         } // END - if
66
67         // Submit button
68         $helperInstance->addFormGroup('buttons_guest', "Gastlogins sind in der Funkionsweise eingeschr&auml;nkt. Mehr dazu unter &quot;Gastlogin&quot;.");
69         $helperInstance->addInputSubmitButton("Als Gast einloggen");
70         $helperInstance->flushContent();
71 }
72
73 // Get helper instance
74 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'register'));
75
76 // Set link text
77 $helperInstance->addLinkWithTextById('register_login');
78
79 // Flush the content
80 $helperInstance->flushContent();
81
82 // [EOC]
83 ?>
84 <div id="content_header">
85         Einloggen zu <span class="app_name">{?app_full_name?}</span>
86 </div>
87
88 <div id="content_body">
89         <div id="login_box">
90                 {?shipsimu_user_login?}
91         </div>
92
93         <div id="guest_login">
94                 {?shipsimu_guest_login?}
95         </div>
96 </div>
97
98 <div id="content_footer">
99         Noch kein Spieleaccount? {?register?}
100 </div>