2 // Import framework stuff
3 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
5 // Get form helper instance
6 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_government_training'));
8 // Prefetch user instance
9 $helperInstance->prefetchValueInstance('user');
11 // Add main form group
12 $helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen!");
14 // Add group for personal data
15 $helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Kursusteilnahme nötig sind:");
17 // Ask again for current account password
18 $helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein.");
19 $helperInstance->addFieldLabel('password', "Derzeitiges Passwort:");
20 $helperInstance->addInputPasswordField('password');
22 // Display email, surname and family name
23 $helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
24 $helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
25 $helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
26 $helperInstance->addFormNote('birthday', "Geburtstag: <span class=\"persona_data\">".(int)$helperInstance->getValueField('birth_day').".".(int)$helperInstance->getValueField('birth_month').".".(int)$helperInstance->getValueField('birth_year')."</span>");
28 // Add link placeholder for profile page
29 $helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?city_profile?}");
32 if ($helperInstance->ifFormSecuredWithCaptcha()) {
33 $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung eines Trainingkursus ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, um den Trainingskursus zu beantragen.");
34 $helperInstance->addCaptcha();
38 $helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
39 $helperInstance->addInputResetButton("Alles nochmal eingeben");
40 $helperInstance->addInputSubmitButton("Trainingskurs beantragen");
41 $helperInstance->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
43 // Flush the finished form
44 $helperInstance->flushContent();
46 // Get link helper for profile link
47 $linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'city_profile'));
50 $linkInstance->addActionLinkById('profile', 'profile');
52 // Flush the finished form
53 $linkInstance->flushContent();
57 <div id="government_frame">
58 <div id="government_header">
59 Virtuelle Beantragung eines Training-Kursus
62 <div id="government_form">
63 {?city_government_training?}