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
5 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'shipsimu_profile'));
7 // Pre-fetch field data with a given registry key
8 $helperInstance->prefetchValueInstance('user');
10 // Password can only be changed when the old one is entered and new one twice!
11 $helperInstance->addFormGroup('pass', "Neues Passwort einrichten:");
12 $helperInstance->addFormSubGroup('pass', "Bitte gebe zum Ändern deines Passwortes zweimal das gewünschte neue Passwort ein.");
13 $helperInstance->addFieldText('pass1', "Neues Passwort:");
14 $helperInstance->addInputPasswordField('pass1');
15 $helperInstance->addFieldText('pass2', "Neues Passwort, Wiederholung:");
16 $helperInstance->addInputPasswordField('pass2');
18 // Display current email
19 $helperInstance->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
21 // Only for changing email address
22 if ($helperInstance->ifEmailChangeAllowed()) {
23 $helperInstance->addFormGroup('email', "Änderung deiner Email-Addresse:");
24 $helperInstance->addFormSubGroup('email', "Gebe nur deine Email-Adresse zweimal ein, wenn du diese ändern möchtest!");
25 $helperInstance->addFieldText('email1', "Email-Adresse:");
26 $helperInstance->addInputTextField('email1');
27 $helperInstance->addFieldText('email2', "Wiederholung Email-Adresse:");
28 $helperInstance->addInputTextField('email2');
30 if ($helperInstance->ifEmailMustBeUnique()) {
31 $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
34 if ($helperInstance->ifEmailChangeRequireConfirmation()) {
35 $helperInstance->addFormNote('confirm', "Es wird ein Bestätigungslink an deine neue Email-Adresse gesendet. Bitte klicke diesen dann möglichst schnell an.");
39 // Add form group for user profile
40 $helperInstance->addFormGroup('profile', "Hier kannst du deine Profildaten ändern.");
42 // Persoenliche Daten mit in der Anmeldung abfragen?
43 if ($helperInstance->ifRegisterIncludesPersonaData()) {
44 $helperInstance->addFormSubGroup('persona', "Wenn du magst, dann vervollständige deine komplette Adresse mit deinem Namen.");
45 $helperInstance->addFieldText('surname', "Dein Vorname:");
46 $helperInstance->addInputTextFieldWithDefault('surname');
47 $helperInstance->addFieldText('family', "Dein Nachname:");
48 $helperInstance->addInputTextFieldWithDefault('family');
49 $helperInstance->addFieldText('street', "Strasse und Hausnummer:");
50 $helperInstance->addInputTextFieldWithDefault('street');
51 $helperInstance->addFieldText('city', "Wohnort:");
52 $helperInstance->addInputTextFieldWithDefault('city');
55 if ($helperInstance->ifProfileIncludesBirthDay()) {
56 $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");
57 $helperInstance->addInputTextField('birth_day');
58 $helperInstance->addFieldText('birth_day', ".");
59 $helperInstance->addInputTextField('birth_month');
60 $helperInstance->addFieldText('birth_day', ".");
61 $helperInstance->addInputTextField('birth_year');
65 // Add sub group for zip code
66 $helperInstance->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?");
67 $helperInstance->addFieldText('zip', "Postleitzahl:");
68 $helperInstance->addInputTextFieldWithDefault('zip');
70 // Add sub group for chat protocols
71 $helperInstance->addFormSubGroup('chat', "Gebe hier deine Nicknames bzw. Nummern an:");
74 if ($helperInstance->ifChatEnabled('icq')) {
75 $helperInstance->addFieldText('icq', "ICQ-Nummer:");
76 $helperInstance->addInputTextFieldWithDefault('icq');
80 if ($helperInstance->ifChatEnabled('jabber')) {
81 $helperInstance->addFieldText('jabber', "Jabber:");
82 $helperInstance->addInputTextFieldWithDefault('jabber');
86 if ($helperInstance->ifChatEnabled('yahoo')) {
87 $helperInstance->addFieldText('yahoo', "Yahoo!:");
88 $helperInstance->addInputTextFieldWithDefault('yahoo');
92 if ($helperInstance->ifChatEnabled('aol')) {
93 $helperInstance->addFieldText('aol', "AOL-Screenname:");
94 $helperInstance->addInputTextFieldWithDefault('aol');
98 if ($helperInstance->ifChatEnabled('msn')) {
99 $helperInstance->addFieldText('msn', "MSN:");
100 $helperInstance->addInputTextFieldWithDefault('msn');
103 if (!$helperInstance->ifRegisterRequiresEmailVerification()) {
104 $helperInstance->addFormExtraNote(1, "Die Benachrichtigungen per Email sind im Loginbereich verfeinerbar, welche du genau haben willst.");
107 // Rules already accepted?
108 if ($helperInstance->ifRulesHaveChanged()) {
109 $helperInstance->addFormGroup('rules', "Bitte lese dir die Spieleregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Spielregeln" an.");
110 $helperInstance->addFieldText('rules', "Ja, ich akzeptiere die aktuellen Spielregeln:");
111 $helperInstance->addInputCheckboxField('rules', false);
113 $helperInstance->addFormNote('rules_accepted', "Du hast die aktuellen Spielregeln akzeptiert. Vielen Dank!");
114 $helperInstance->addInputHiddenField('rules', "1");
118 if ($helperInstance->ifFormSecuredWithCaptcha()) {
119 $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.");
120 $helperInstance->addCaptcha();
123 // Ask again for current account password
124 $helperInstance->addFormGroup('pass_old', "Bitte gebe zur Bestätigung der Änderungen dein derzeitiges Passwort ein.");
125 $helperInstance->addFieldText('pass_old', "Derzeitiges Passwort:");
126 $helperInstance->addInputPasswordField('pass_old');
129 $helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
130 $helperInstance->addInputResetButton("Alles nochmal eingeben");
131 $helperInstance->addInputSubmitButton("Accountdaten aktualisieren");
132 $helperInstance->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
134 // Flush finished form
135 $helperInstance->flushContent();
139 <div id="content_header">
140 Deine Profildaten bearbeiten
143 <div id="profile_box">