]> git.mxchange.org Git - city.git/blob - application/city/templates/code/action_city_login_status_problem.ctp
Continued:
[city.git] / application / city / templates / code / action_city_login_status_problem.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, 'resend_link'));
9
10 // Pre-fetch field data with a given registry key
11 $helperInstance->prefetchValueInstance('user');
12
13 // Add submit button or notice
14 if ($helperInstance->ifUserAccountUnconfirmed()) {
15         // Add submit button
16         $helperInstance->addInputHiddenFieldWithDefault('email');
17         $helperInstance->addInputSubmitButton("Best&auml;tigungslink erneut aussenden");
18 } elseif ($helperInstance->ifUserAccountLocked()) {
19         // Account is locked
20         $helperInstance->addFormNote('status_locked', "Dein Account wurde gesperrt! Grund der Sperre:
21                 <span id=\"lock_reason\">".$helperInstance->getValueField('lock_reason')."</span>
22                 Bitte melde dich beim Support, damit dieser dir weiterhelfen kann."
23         );
24 } elseif ($helperInstance->ifUserAccountGuest()) {
25         // Account is guest account
26         $helperInstance->addFormNote('status_guest', "G&auml;steaccounts sind in der Funktionalit&auml;t
27                 leicht eingeschr&auml;nkt. Bitte melde dich an, damit du ein
28                 vollwertiges Account bekommst."
29         );
30 }
31
32 // Flush content and automatically close the form
33 $helperInstance->flushContent();
34
35 // Build the form for confirmation
36 $helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'confirm_code'));
37
38 // Pre-fetch field data with a given registry key
39 $helperInstance->prefetchValueInstance('user');
40
41 if ($helperInstance->ifUserAccountUnconfirmed()) {
42         // Add code box
43         $helperInstance->addFormGroup('code', "Bitte gebe hier den Best&auml;tigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen.");
44         $helperInstance->addFieldLabel('code', "Best&auml;tigungscode aus der Mail:");
45         $helperInstance->addInputTextField('code');
46
47         // Add submit button
48         $helperInstance->addFormGroup('buttons', "Bitte einmal abschicken und das Ergebnis abwarten!");
49         $helperInstance->addInputResetButton("Nochmal eingeben");
50         $helperInstance->addInputSubmitButton("Best&auml;tigungscode absenden");
51 } else {
52         // Add message
53         $helperInstance->addFormNote('status_not_unconfirmed', "M&ouml;glicherweise hast du einen Best&auml;tigungslink angeklickt, obwohl dein Account bereits freigegeben oder gesperrt ist.");
54 }
55
56 // Flush content and automatically close the form
57 $helperInstance->flushContent();
58
59 // [EOC]
60 ?>
61 <div id="content_header">
62         Problem mit deinem Account gefunden:
63 </div>
64
65 <div id="status_box">
66         Du bist m&ouml;glicherweise f&uuml;r deine ausgew&auml;hlte Aktion nicht
67         berechtigt oder du hast noch deine Email-Adresse nicht best&auml;tigt. Du
68         kannst dir nun den Best&auml;tigungslink erneut aussenden lassen, oder den
69         Best&auml;tigungscode unten eingeben.
70
71         <div id="resend_link_box">
72                 {?resend_link?}
73         </div>
74
75         <div id="confirm_code_header">
76                 Weitere M&ouml;glichkeiten:
77         </div>
78
79         <div id="confirm_code_box">
80                 {?confirm_code?}
81         </div>
82 </div>