2 // Import framework stuff
3 use Org\Mxchange\CoreFramework\Factory\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_profile"));
10 // Pre-fetch field data with a given registry key
11 $helperInstance->prefetchValueInstance('user');
13 // Password can only be changed when the old one is entered and new one twice!
14 $helperInstance->addFormGroup('pass', "Neues Passwort einrichten:");
15 $helperInstance->addFormSubGroup('pass', "Bitte gebe zum Ändern deines Passwortes zweimal das gewünschte neue Passwort ein.");
16 $helperInstance->addFieldLabel('pass1', "Neues Passwort:");
17 $helperInstance->addInputPasswordField('pass1');
18 $helperInstance->addFieldLabel('pass2', "Neues Passwort, Wiederholung:");
19 $helperInstance->addInputPasswordField('pass2');
21 // Display current email
22 $helperInstance->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
24 // Only for changing email address
25 if ($helperInstance->ifEmailChangeAllowed()) {
26 $helperInstance->addFormGroup('email', "Änderung deiner Email-Addresse:");
27 $helperInstance->addFormSubGroup('email', "Gebe nur deine Email-Adresse zweimal ein, wenn du diese ändern möchtest!");
28 $helperInstance->addFieldLabel('email1', "Email-Adresse:");
29 $helperInstance->addInputTextField('email1');
30 $helperInstance->addFieldLabel('email2', "Wiederholung Email-Adresse:");
31 $helperInstance->addInputTextField('email2');
33 if ($helperInstance->ifEmailMustBeUnique()) {
34 $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
37 if ($helperInstance->ifEmailChangeRequireConfirmation()) {
38 $helperInstance->addFormNote('confirm', "Es wird ein Bestätigungslink an deine neue Email-Adresse gesendet. Bitte klicke diesen dann möglichst schnell an.");
42 // Add form group for user profile
43 $helperInstance->addFormGroup('profile', "Hier kannst du deine Profildaten ändern.");
45 // Persoenliche Daten mit in der Anmeldung abfragen?
46 if ($helperInstance->ifRegisterIncludesPersonaData()) {
47 $helperInstance->addFormSubGroup('persona', "Wenn du magst, dann vervollständige deine komplette Adresse mit deinem Namen.");
48 $helperInstance->addFieldLabel('surname', "Dein Vorname:");
49 $helperInstance->addInputTextFieldWithDefault('surname');
50 $helperInstance->addFieldLabel('family', "Dein Nachname:");
51 $helperInstance->addInputTextFieldWithDefault('family');
52 $helperInstance->addFieldLabel('street', "Strasse und Hausnummer:");
53 $helperInstance->addInputTextFieldWithDefault('street');
54 $helperInstance->addFieldLabel('city', "Wohnort:");
55 $helperInstance->addInputTextFieldWithDefault('city');
58 if ($helperInstance->ifProfileIncludesBirthDay()) {
59 $helperInstance->addFormSubGroup('birthday', "Verrate uns doch dein Geburtsdatum, als Dankeschön erhälst du interessante Prämien - ausschliesslich per Email - zum Geburtstag zugesandt! Gültiges Format: TT.MM.JJJJ");
60 $helperInstance->addInputTextField('birth_day');
61 $helperInstance->addFieldLabel('birth_day', ".");
62 $helperInstance->addInputTextField('birth_month');
63 $helperInstance->addFieldLabel('birth_day', ".");
64 $helperInstance->addInputTextField('birth_year');
68 // Add sub group for zip code
69 $helperInstance->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?");
70 $helperInstance->addFieldLabel('zip', "Postleitzahl:");
71 $helperInstance->addInputTextFieldWithDefault('zip');
73 // Add sub group for chat protocols
74 $helperInstance->addFormSubGroup('chat', "Gebe hier deine Nicknames bzw. Nummern an:");
77 if ($helperInstance->ifChatEnabled('icq')) {
78 $helperInstance->addFieldLabel('icq', "ICQ-Nummer:");
79 $helperInstance->addInputTextFieldWithDefault('icq');
83 if ($helperInstance->ifChatEnabled('jabber')) {
84 $helperInstance->addFieldLabel('jabber', "Jabber:");
85 $helperInstance->addInputTextFieldWithDefault('jabber');
89 if ($helperInstance->ifChatEnabled('yahoo')) {
90 $helperInstance->addFieldLabel('yahoo', "Yahoo!:");
91 $helperInstance->addInputTextFieldWithDefault('yahoo');
95 if ($helperInstance->ifChatEnabled('aol')) {
96 $helperInstance->addFieldLabel('aol', "AOL-Screenname:");
97 $helperInstance->addInputTextFieldWithDefault('aol');
101 if ($helperInstance->ifChatEnabled('msn')) {
102 $helperInstance->addFieldLabel('msn', "MSN:");
103 $helperInstance->addInputTextFieldWithDefault('msn');
106 if (!$helperInstance->ifRegisterRequiresEmailVerification()) {
107 $helperInstance->addFormExtraNote(1, "Die Benachrichtigungen per Email sind im Loginbereich verfeinerbar, welche du genau haben willst.");
110 // Rules already accepted?
111 if ($helperInstance->ifRulesHaveChanged()) {
112 $helperInstance->addFormGroup('rules', "Bitte lese dir die Spieleregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Spielregeln" an.");
113 $helperInstance->addFieldLabel('rules', "Ja, ich akzeptiere die aktuellen Spielregeln:");
114 $helperInstance->addInputCheckboxField('rules', false);
116 $helperInstance->addFormNote('rules_accepted', "Du hast die aktuellen Spielregeln akzeptiert. Vielen Dank!");
117 $helperInstance->addInputHiddenField('rules', "1");
121 if ($helperInstance->ifFormSecuredWithCaptcha()) {
122 $helperInstance->addFormGroup('captcha_user', "Das Ändern von Profildaten ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit deine Änderungen gespeichert werden können.");
123 $helperInstance->addCaptcha();
126 // Ask again for current account password
127 $helperInstance->addFormGroup('pass_old', "Bitte gebe zur Bestätigung der Änderungen dein derzeitiges Passwort ein.");
128 $helperInstance->addFieldLabel('pass_old', "Derzeitiges Passwort:");
129 $helperInstance->addInputPasswordField('pass_old');
132 $helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
133 $helperInstance->addInputResetButton("Alles nochmal eingeben");
134 $helperInstance->addInputSubmitButton("Accountdaten aktualisieren");
135 $helperInstance->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
137 // Flush finished form
138 $helperInstance->flushContent();
142 <div id="content_header">
143 Deine Profildaten bearbeiten
146 <div id="profile_box">