+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helper = WebFormHelper::createWebFormHelper($this, "shipsimu_profile");
+
+// Pre-fetch field data with a given registry key
+$helper->prefetchFieldValues('user');
+
+// Password can only be changed when the old one is entered and new one twice!
+$helper->addFormGroup("pass", "Neues Passwort einrichten:");
+$helper->addFormSubGroup("password", "Bitte gebe zum Ändern deines Passwortes zweimal das gewünschte neue Passwort ein.");
+$helper->addFieldText("pass1", "Neues Passwort:");
+$helper->addInputPasswordField("pass1");
+$helper->addFieldText("pass2", "Neues Passwort, Wiederholung:");
+$helper->addInputPasswordField("pass2");
+
+// Display current email
+$helper->addFormNote("Derzeitige Email-Adresse: <span id=\"displayed_field\">".$helper->getField("email")."</span>");
+
+// Only for changing email address
+if ($helper->ifEmailChangeAllowed()) {
+ $helper->addFormGroup("email", "Änderung deiner Email-Addresse:");
+ $helper->addFormSubGroup("email", "Gebe nur deine Email-Adresse zweimal ein, wenn du diese ändern möchtest!");
+ $helper->addFieldText("email1", "Email-Adresse:");
+ $helper->addInputTextField("email1");
+ $helper->addFieldText("email2", "Wiederholung Email-Adresse:");
+ $helper->addInputTextField("email2");
+
+ if ($helper->ifEmailMustBeUnique()) {
+ $helper->addFormNote("Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
+ } // END - Unique email addresses
+
+ if ($helper->ifEmailChangeRequireConfirmation()) {
+ $helper->addFormNote("Es wird ein Bestätigungslink an deine neue Email-Adresse gesendet. Bitte klicke diesen dann möglichst schnell an.");
+ } // END - Change requires confirmation
+} // END - email change allowed
+
+$helper->addFormGroup("profile", "Hier kannst du deine Profildaten ändern.");
+
+// Persoenliche Daten mit in der Anmeldung abfragen?
+if ($helper->ifRegisterIncludesPersonaData()) {
+ $helper->addFormSubGroup("persona", "Wenn du magst, dann vervollständige deine komplette Adresse mit deinem Namen.");
+ $helper->addFieldText("surname", "Dein Vorname:");
+ $helper->addInputTextFieldWithDefault("surname");
+ $helper->addFieldText("family", "Dein Nachname:");
+ $helper->addInputTextFieldWithDefault("family");
+ $helper->addFieldText("street", "Strasse und Hausnummer:");
+ $helper->addInputTextFieldWithDefault("street");
+ $helper->addFieldText("city", "Wohnort:");
+ $helper->addInputTextFieldWithDefault("city");
+} // END - Persona data
+
+$helper->addFormSubGroup("zip", "Magst du uns auch deine Postleitzahl verraten?");
+$helper->addFieldText("zip", "Postleitzahl:");
+$helper->addInputTextFieldWithDefault("zip");
+
+$helper->addFormSubGroup("chat", "Gebe hier deine Nicknames bzw. Nummern an:");
+
+if ($helper->ifChatEnabled("icq")) {
+ $helper->addFieldText("icq", "ICQ-Nummer:");
+ $helper->addInputTextFieldWithDefault("icq");
+} // END - if
+
+if ($helper->ifChatEnabled("jabber")) {
+ $helper->addFieldText("jabber", "Jabber:");
+ $helper->addInputTextFieldWithDefault("jabber");
+} // END - if
+
+if ($helper->ifChatEnabled("yahoo")) {
+ $helper->addFieldText("yahoo", "Yahoo!:");
+ $helper->addInputTextFieldWithDefault("yahoo");
+} // END - if
+
+if ($helper->ifChatEnabled("aol")) {
+ $helper->addFieldText("aol", "AOL-Screenname:");
+ $helper->addInputTextFieldWithDefault("aol");
+} // END - if
+
+if ($helper->ifChatEnabled("msn")) {
+ $helper->addFieldText("msn", "MSN:");
+ $helper->addInputTextFieldWithDefault("msn");
+} // END - if
+
+if (!$helper->ifRegisterRequiresEmailVerification()) {
+ $helper->addFormExtraNote(1, "Die Benachrichtigungen per sind im Loginbereich verfeinerbar, welche du genau haben willst.");
+} // END - Extra note
+
+// Rules already accepted?
+if ($helper->ifRulesHaveChanged()) {
+ $helper->addFormGroup("rules", "Bitte lese dir die Spieleregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Spielregeln" an.");
+ $helper->addFieldText("rules", "Ja, ich akzeptiere die aktuellen Spielregeln:");
+ $helper->addInputCheckboxField("rules", false);
+} else {
+ $helper->addFormNote("Du hast die aktuellen Spielregeln akzeptiert. Vielen Dank!");
+ $helper->addInputHiddenField("rules", "1");
+}
+
+// Ask again for current account password
+$helper->addFormGroup("pass_old", "Bitte gebe zur Bestätigung der Änderungen dein derzeiges Passwort ein.");
+$helper->addFieldText("pass_old", "Altes Passwort:");
+$helper->addInputPasswordField("pass_old");
+
+// Abschliessender Hinweis und Abschluss des Formulars
+$helper->addFormGroup("buttons", "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
+$helper->addInputResetButton("Alles nochmal eingeben");
+$helper->addInputSubmitButton("Accountdaten aktualisieren");
+$helper->addFormNote("Deine Daten werden nach den gültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
+$helper->addFormTag();
+$helper->flushContent();
+?>
+<div id="content_header">
+ Ihre Profildaten bearbeiten
+</div>
+
+<div id="profile_box">
+ {?shipsimu_profile?}
+</div>