]> git.mxchange.org Git - city.git/blob - application/city/templates/code/action_city_login_profile.ctp
Continued:
[city.git] / application / city / templates / code / action_city_login_profile.ctp
1 <?php
2 // Import framework stuff
3 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
4
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
7 // BaseHelper.
8 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, "city_profile"));
9
10 // Pre-fetch field data with a given registry key
11 $helperInstance->prefetchValueInstance('user');
12
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 &Auml;ndern deines Passwortes zweimal das gew&uuml;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');
20
21 // Display current email
22 $helperInstance->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
23
24 // Only for changing email address
25 if ($helperInstance->ifEmailChangeAllowed()) {
26         $helperInstance->addFormGroup('email', "&Auml;nderung deiner Email-Addresse:");
27         $helperInstance->addFormSubGroup('email', "Gebe nur deine Email-Adresse zweimal ein, wenn du diese &auml;ndern m&ouml;chtest!");
28         $helperInstance->addFieldLabel('email1', "Email-Adresse:");
29         $helperInstance->addInputTextField('email1');
30         $helperInstance->addFieldLabel('email2', "Wiederholung Email-Adresse:");
31         $helperInstance->addInputTextField('email2');
32
33         if ($helperInstance->ifEmailMustBeUnique()) {
34                 $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
35         } // END - if
36
37         if ($helperInstance->ifEmailChangeRequireConfirmation()) {
38                 $helperInstance->addFormNote('confirm', "Es wird ein Best&auml;tigungslink an deine neue Email-Adresse gesendet. Bitte klicke diesen dann m&ouml;glichst schnell an.");
39         } // END - if
40 } // END - if
41
42 // Add form group for user profile
43 $helperInstance->addFormGroup('profile', "Hier kannst du deine Profildaten &auml;ndern.");
44
45 // Persoenliche Daten mit in der Anmeldung abfragen?
46 if ($helperInstance->ifRegisterIncludesPersonaData()) {
47         $helperInstance->addFormSubGroup('persona', "Wenn du magst, dann vervollst&auml;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');
56
57         // Include birthday?
58         if ($helperInstance->ifProfileIncludesBirthDay()) {
59                 $helperInstance->addFormSubGroup('birthday', "Verrate uns doch dein Geburtsdatum, als Dankesch&ouml;n erh&auml;lst du interessante Pr&auml;mien - ausschliesslich per Email - zum Geburtstag zugesandt! G&uuml;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');
65         } // END - if
66 } // END - if
67
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');
72
73 // Add sub group for chat protocols
74 $helperInstance->addFormSubGroup('chat', "Gebe hier deine Nicknames bzw. Nummern an:");
75
76 // Add ICQ chat?
77 if ($helperInstance->ifChatEnabled('icq')) {
78         $helperInstance->addFieldLabel('icq', "ICQ-Nummer:");
79         $helperInstance->addInputTextFieldWithDefault('icq');
80 } // END - if
81
82 // Add Jabber chat?
83 if ($helperInstance->ifChatEnabled('jabber')) {
84         $helperInstance->addFieldLabel('jabber', "Jabber:");
85         $helperInstance->addInputTextFieldWithDefault('jabber');
86 } // END - if
87
88 // Add Yahoo! chat?
89 if ($helperInstance->ifChatEnabled('yahoo')) {
90         $helperInstance->addFieldLabel('yahoo', "Yahoo!:");
91         $helperInstance->addInputTextFieldWithDefault('yahoo');
92 } // END - if
93
94 // Add AOL chat?
95 if ($helperInstance->ifChatEnabled('aol')) {
96         $helperInstance->addFieldLabel('aol', "AOL-Screenname:");
97         $helperInstance->addInputTextFieldWithDefault('aol');
98 } // END - if
99
100 // Add MSN chat?
101 if ($helperInstance->ifChatEnabled('msn')) {
102         $helperInstance->addFieldLabel('msn', "MSN:");
103         $helperInstance->addInputTextFieldWithDefault('msn');
104 } // END - if
105
106 if (!$helperInstance->ifRegisterRequiresEmailVerification()) {
107         $helperInstance->addFormExtraNote(1, "Die Benachrichtigungen per Email sind im Loginbereich verfeinerbar, welche du genau haben willst.");
108 } // END - if
109
110 // Rules already accepted?
111 if ($helperInstance->ifRulesHaveChanged()) {
112         $helperInstance->addFormGroup('rules', "Bitte lese dir die Spieleregeln gut durch und kreuze dann &quot;Ja, ich akzeptiere die aktuellen Spielregeln&quot; an.");
113         $helperInstance->addFieldLabel('rules', "Ja, ich akzeptiere die aktuellen Spielregeln:");
114         $helperInstance->addInputCheckboxField('rules', false);
115 } else {
116         $helperInstance->addFormNote('rules_accepted', "Du hast die aktuellen Spielregeln akzeptiert. Vielen Dank!");
117         $helperInstance->addInputHiddenField('rules', "1");
118 }
119
120 // CAPTCHA enabled?
121 if ($helperInstance->ifFormSecuredWithCaptcha()) {
122         $helperInstance->addFormGroup('captcha_user', "Das &Auml;ndern von Profildaten ist durch ein CAPTCHA gesch&uuml;tzt. Bitte wiederhole den angezeigten Code, damit deine &Auml;nderungen gespeichert werden k&ouml;nnen.");
123         $helperInstance->addCaptcha();
124 } // END - if
125
126 // Ask again for current account password
127 $helperInstance->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der &Auml;nderungen dein derzeitiges Passwort ein.");
128 $helperInstance->addFieldLabel('pass_old', "Derzeitiges Passwort:");
129 $helperInstance->addInputPasswordField('pass_old');
130
131 // Final notices
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&uuml;ltigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link &quot;Datenschutz&quot;.");
136
137 // Flush finished form
138 $helperInstance->flushContent();
139
140 // [EOC]
141 ?>
142 <div id="content_header">
143         Deine Profildaten bearbeiten
144 </div>
145
146 <div id="profile_box">
147         {?city_profile?}
148 </div>