2 // Import framework stuff
3 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
5 // Get helper instance for web forms. This will add the opening form-tag to
6 // the helper's render cache which is simply a small variable in the class
8 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_user_login'));
10 // Is the form enabled?
11 if ($helperInstance->ifLoginIsEnabled()) {
13 $helperInstance->addFormGroup('login', "Gebe hier deine Logindaten ein:");
15 // Which login method has been configured?
16 if ($helperInstance->ifLoginWithUsername()) {
17 // Login with user name only
18 $helperInstance->addFormSubGroup('username', "Bitte mit deinem Nickname einloggen.");
19 $helperInstance->addFieldLabel('username', "Dein Nickname:");
20 $helperInstance->addInputTextField('username');
21 } elseif ($helperInstance->ifLoginWithEmail()) {
22 // Login with email address only
23 $helperInstance->addFormSubGroup('email', "Bitte mit deiner Email-Adresse einloggen.");
24 $helperInstance->addFieldLabel('email', "Deine Email-Addresse:");
25 $helperInstance->addInputTextField('email');
27 // Login with email address or user name
28 $helperInstance->addFormSubGroup('user_email', "Bitte mit deinem Nickname oder Email-Adresse einloggen.");
29 $helperInstance->addFieldLabel('user_email', "Dein Nickname/Email:");
30 $helperInstance->addInputTextField('user_email');
33 // Add password input field
34 $helperInstance->addFormSubGroup('pass', "Gebe dein Passwort von der Anmeldung ein.");
35 $helperInstance->addFieldLabel('pass', "Dein Passwort:");
36 $helperInstance->addInputPasswordField('pass');
39 if ($helperInstance->ifFormSecuredWithCaptcha()) {
40 $helperInstance->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
41 $helperInstance->addCaptcha();
45 $helperInstance->addFormGroup('buttons_user', "Alles richtig eingegeben?");
46 $helperInstance->addInputResetButton("Formular leeren");
47 $helperInstance->addInputSubmitButton("Zum Spiel einloggen");
50 $helperInstance->addFormNote('form_deactivated', "Einloggen in's Spiel ist derzeit administrativ deaktiviert worden. Bitte komme später noch mal wieder.");
51 $helperInstance->addFormNote('admin_notice', "Nachricht vom Admin: <span id=\"disabled_reason\">".$this->getConfigInstance()->readConfig('login_disabled_reason')."</span>");
54 // Formular schliessen
55 $helperInstance->flushContent();
57 // Ist Gastlogin erlaubt?
58 if ($helperInstance->ifGuestLoginAllowed()) {
59 // Neue Helper-Instanz holen
60 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_guest_login'));
61 $helperInstance->addInputHiddenConfiguredField('user', 'guest_login');
62 $helperInstance->addInputHiddenConfiguredField('passwd', 'guest_login');
65 if ($helperInstance->ifFormSecuredWithCaptcha()) {
66 $helperInstance->addFormGroup('captcha_guest', "Unser Gast-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
67 $helperInstance->addCaptcha();
71 $helperInstance->addFormGroup('buttons_guest', "Gastlogins sind in der Funkionsweise eingeschränkt. Mehr dazu unter "Gastlogin".");
72 $helperInstance->addInputSubmitButton("Als Gast einloggen");
73 $helperInstance->flushContent();
76 // Get helper instance
77 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'register'));
80 $helperInstance->addLinkWithTextById('register_login');
83 $helperInstance->flushContent();
87 <div id="content_header">
88 <h3>Einloggen zu <span class="app_name">{?app_full_name?}</span></h3>
91 <div id="content_body" class="row">
92 <div id="login_box" class="col-md-6">
96 <div id="guest_login" class="col-md-6">
101 <div id="content_footer" class="row">
102 <div class="col-md-12">
103 Noch kein Spieleaccount? {?register?}