@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $this->get("user-registration/"); |
| 24 | 24 | |
| 25 | 25 | $this->submitForm("SignUpForm", "action_doSubmit", array("FirstName" => "John", |
| 26 | - "Password[_Password]" => "admin", |
|
| 26 | + "Password[_Password]" => "admin", |
|
| 27 | 27 | "Password[_ConfirmPassword]" => "admin", "Email" => "[email protected]")); |
| 28 | 28 | |
| 29 | 29 | $this->assertEquals( |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | $this->assertEquals( |
| 30 | 30 | 1, |
| 31 | - Member::get()->filter("Email", "[email protected]")->count()>0 ? 1 : 0, |
|
| 31 | + Member::get()->filter("Email", "[email protected]")->count() > 0 ? 1 : 0, |
|
| 32 | 32 | 'testMyForm() returns the user email' |
| 33 | 33 | ); |
| 34 | 34 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | if (Security::getCurrentUser()) { |
| 27 | 27 | $html = DBHTMLText::create(); |
| 28 | - $html->setValue("<a href='" . Security::logout_url() . "&BackURL=/'>Logout</a>"); |
|
| 28 | + $html->setValue("<a href='".Security::logout_url()."&BackURL=/'>Logout</a>"); |
|
| 29 | 29 | return $html; |
| 30 | 30 | } |
| 31 | 31 | return false; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | if (!$allGroups->count()) { |
| 21 | 21 | $authorGroup = new Group(); |
| 22 | 22 | $authorGroup->Code = 'general'; |
| 23 | - $authorGroup->Title = _t(__CLASS__ . '.DefaultGroupTitleGeneral', 'General'); |
|
| 23 | + $authorGroup->Title = _t(__CLASS__.'.DefaultGroupTitleGeneral', 'General'); |
|
| 24 | 24 | $authorGroup->Sort = 1; |
| 25 | 25 | $authorGroup->write(); |
| 26 | 26 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | if ($page = DataObject::get_one(self::class)) { |
| 43 | 43 | return $page; |
| 44 | 44 | } |
| 45 | - user_error(_t(__CLASS__ . '.NoPage', 'No UserProfilePage was found. |
|
| 45 | + user_error(_t(__CLASS__.'.NoPage', 'No UserProfilePage was found. |
|
| 46 | 46 | Please create one in the CMS!'), E_USER_ERROR); |
| 47 | 47 | return null; |
| 48 | 48 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | if ($page = DataObject::get_one(self::class)) { |
| 43 | 43 | return $page; |
| 44 | 44 | } |
| 45 | - user_error(_t(__CLASS__ . '.NoPage', 'No LostPasswordPage was found. |
|
| 45 | + user_error(_t(__CLASS__.'.NoPage', 'No LostPasswordPage was found. |
|
| 46 | 46 | Please create one in the CMS!'), E_USER_ERROR); |
| 47 | 47 | return null; |
| 48 | 48 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | if ($page = DataObject::get_one(self::class)) { |
| 42 | 42 | return $page; |
| 43 | 43 | } |
| 44 | - user_error(_t(__CLASS__ . '.NoPage', 'No CustomerLoginPage was found. |
|
| 44 | + user_error(_t(__CLASS__.'.NoPage', 'No CustomerLoginPage was found. |
|
| 45 | 45 | Please create one in the CMS!'), E_USER_ERROR); |
| 46 | 46 | return null; // just to keep static analysis happy |
| 47 | 47 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | if ($page = DataObject::get_one(self::class)) { |
| 42 | 42 | return $page; |
| 43 | 43 | } |
| 44 | - user_error(_t(__CLASS__ . '.NoPage', 'No UserRegistrationPage was found. |
|
| 44 | + user_error(_t(__CLASS__.'.NoPage', 'No UserRegistrationPage was found. |
|
| 45 | 45 | Please create one in the CMS!'), E_USER_ERROR); |
| 46 | 46 | return null; // just to keep static analysis happy |
| 47 | 47 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $signUpPersonal = Member::create(); |
| 48 | 48 | $form->saveInto($signUpPersonal); |
| 49 | 49 | if (isset($data['DOB']) && $data['DOB']) { |
| 50 | - $signUpPersonal->DOB = date('Y-m-d', strtotime($data['DOB'])); |
|
| 50 | + $signUpPersonal->DOB = date('Y-m-d', strtotime($data['DOB'])); |
|
| 51 | 51 | } |
| 52 | 52 | $signUpPersonal->write(); |
| 53 | 53 | $Member = Member::get()->byId($signUpPersonal->ID); |
@@ -63,10 +63,10 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * @param Controller $controller the controller instance that is being passed to the form |
|
| 68 | - * @return FieldList Fields for this form. |
|
| 69 | - */ |
|
| 66 | + /** |
|
| 67 | + * @param Controller $controller the controller instance that is being passed to the form |
|
| 68 | + * @return FieldList Fields for this form. |
|
| 69 | + */ |
|
| 70 | 70 | protected function getFormFields($controller = null) |
| 71 | 71 | { |
| 72 | 72 | $fields = FieldList::create( |
@@ -55,11 +55,11 @@ |
||
| 55 | 55 | try { |
| 56 | 56 | $form->saveInto($member); |
| 57 | 57 | $member->write(); |
| 58 | - $msg = $this->getCustomMessage('ProfileUpdateSuccess')!="" |
|
| 58 | + $msg = $this->getCustomMessage('ProfileUpdateSuccess') != "" |
|
| 59 | 59 | ? $this->getCustomMessage('ProfileUpdateSuccess') : "Profile updated!"; |
| 60 | 60 | $form->sessionMessage($msg, 'good'); |
| 61 | 61 | } catch (\Exception $e) { |
| 62 | - $msg = $this->getCustomMessage('ProfileUpdatError')!="" |
|
| 62 | + $msg = $this->getCustomMessage('ProfileUpdatError') != "" |
|
| 63 | 63 | ? $this->getCustomMessage('ProfileUpdatError') : "Technical issue, Profile not updated!"; |
| 64 | 64 | $form->sessionMessage($msg, 'bad'); |
| 65 | 65 | } |
@@ -80,17 +80,17 @@ |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
| 83 | - * Return the Message from siteconfig |
|
| 84 | - * @return string |
|
| 85 | - */ |
|
| 83 | + * Return the Message from siteconfig |
|
| 84 | + * @return string |
|
| 85 | + */ |
|
| 86 | 86 | public function getCustomMessage($field) |
| 87 | 87 | { |
| 88 | 88 | return $this->siteConfig->$field; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | - * Assign siteconfig object |
|
| 93 | - */ |
|
| 92 | + * Assign siteconfig object |
|
| 93 | + */ |
|
| 94 | 94 | protected function setsiteConfig() |
| 95 | 95 | { |
| 96 | 96 | $this->siteConfig = SiteConfig::current_site_config(); |