@@ -22,29 +22,29 @@ |
||
22 | 22 | $builder |
23 | 23 | ->add( |
24 | 24 | 'email', EmailType::Class, [ |
25 | - 'attr' => [ |
|
26 | - 'autofocus' => 'autofocus', |
|
27 | - 'size' => '10%', |
|
28 | - 'style' => 'width: 250px;' |
|
29 | - ], |
|
30 | - 'required' => true, |
|
31 | - 'disabled' => false, |
|
32 | - 'label' => false, |
|
33 | - 'trim' => true |
|
34 | - ] |
|
25 | + 'attr' => [ |
|
26 | + 'autofocus' => 'autofocus', |
|
27 | + 'size' => '10%', |
|
28 | + 'style' => 'width: 250px;' |
|
29 | + ], |
|
30 | + 'required' => true, |
|
31 | + 'disabled' => false, |
|
32 | + 'label' => false, |
|
33 | + 'trim' => true |
|
34 | + ] |
|
35 | 35 | ) |
36 | 36 | ->add( |
37 | 37 | 'activationCode', null, [ |
38 | - 'attr' => [ |
|
39 | - 'size' => '10%', |
|
40 | - 'pattern' => '[A-F0-9]{13}', |
|
41 | - 'style' => 'width: 250px;' |
|
42 | - ], |
|
43 | - 'required' => true, |
|
44 | - 'disabled' => false, |
|
45 | - 'label' => false, |
|
46 | - 'trim' => true |
|
47 | - ] |
|
38 | + 'attr' => [ |
|
39 | + 'size' => '10%', |
|
40 | + 'pattern' => '[A-F0-9]{13}', |
|
41 | + 'style' => 'width: 250px;' |
|
42 | + ], |
|
43 | + 'required' => true, |
|
44 | + 'disabled' => false, |
|
45 | + 'label' => false, |
|
46 | + 'trim' => true |
|
47 | + ] |
|
48 | 48 | ) |
49 | 49 | ->add( |
50 | 50 | 'submit', SubmitType::class, [ |
@@ -29,94 +29,94 @@ discard block |
||
29 | 29 | $builder |
30 | 30 | ->add( |
31 | 31 | 'username', null, [ |
32 | - 'attr' => [ |
|
33 | - 'autofocus' => 'autofocus', |
|
34 | - 'size' => '10%', |
|
35 | - 'pattern' => '[a-zA-Z0-9_-]{3,60}', |
|
36 | - 'style' => 'width: 250px;' |
|
37 | - ], |
|
38 | - 'required' => true, |
|
39 | - 'disabled' => false, |
|
40 | - 'label' => false, |
|
41 | - 'trim' => true |
|
42 | - ] |
|
32 | + 'attr' => [ |
|
33 | + 'autofocus' => 'autofocus', |
|
34 | + 'size' => '10%', |
|
35 | + 'pattern' => '[a-zA-Z0-9_-]{3,60}', |
|
36 | + 'style' => 'width: 250px;' |
|
37 | + ], |
|
38 | + 'required' => true, |
|
39 | + 'disabled' => false, |
|
40 | + 'label' => false, |
|
41 | + 'trim' => true |
|
42 | + ] |
|
43 | 43 | ) |
44 | 44 | ->add( |
45 | 45 | 'firstname', null, [ |
46 | - 'attr' => [ |
|
47 | - 'size' => '10%', |
|
48 | - 'minlength' => '3', |
|
49 | - 'maxlength' => '100', |
|
50 | - 'style' => 'width: 250px;' |
|
51 | - ], |
|
52 | - 'required' => false, |
|
53 | - 'disabled' => false, |
|
54 | - 'label' => false, |
|
55 | - 'trim' => true |
|
56 | - ] |
|
46 | + 'attr' => [ |
|
47 | + 'size' => '10%', |
|
48 | + 'minlength' => '3', |
|
49 | + 'maxlength' => '100', |
|
50 | + 'style' => 'width: 250px;' |
|
51 | + ], |
|
52 | + 'required' => false, |
|
53 | + 'disabled' => false, |
|
54 | + 'label' => false, |
|
55 | + 'trim' => true |
|
56 | + ] |
|
57 | 57 | ) |
58 | 58 | ->add( |
59 | 59 | 'lastname', null, [ |
60 | - 'attr' => [ |
|
61 | - 'size' => '10%', |
|
62 | - 'minlength' => '3', |
|
63 | - 'maxlength' => '100', |
|
64 | - 'style' => 'width: 250px;' |
|
65 | - ], |
|
66 | - 'required' => false, |
|
67 | - 'disabled' => false, |
|
68 | - 'label' => false, |
|
69 | - 'trim' => true |
|
70 | - ] |
|
60 | + 'attr' => [ |
|
61 | + 'size' => '10%', |
|
62 | + 'minlength' => '3', |
|
63 | + 'maxlength' => '100', |
|
64 | + 'style' => 'width: 250px;' |
|
65 | + ], |
|
66 | + 'required' => false, |
|
67 | + 'disabled' => false, |
|
68 | + 'label' => false, |
|
69 | + 'trim' => true |
|
70 | + ] |
|
71 | 71 | ) |
72 | 72 | ->add( |
73 | 73 | 'country', ChoiceType::Class, [ |
74 | - 'attr' => [ |
|
75 | - 'expanded' => false, |
|
76 | - 'multiple' => false, |
|
77 | - 'style' => 'width: 250px;' |
|
78 | - ], |
|
79 | - 'choices' => $options['countryList'], |
|
80 | - 'required' => false, |
|
81 | - 'disabled' => false, |
|
82 | - 'label' => false, |
|
83 | - ] |
|
74 | + 'attr' => [ |
|
75 | + 'expanded' => false, |
|
76 | + 'multiple' => false, |
|
77 | + 'style' => 'width: 250px;' |
|
78 | + ], |
|
79 | + 'choices' => $options['countryList'], |
|
80 | + 'required' => false, |
|
81 | + 'disabled' => false, |
|
82 | + 'label' => false, |
|
83 | + ] |
|
84 | 84 | ) |
85 | 85 | ->add( |
86 | 86 | 'email', EmailType::Class, [ |
87 | - 'attr' => [ |
|
88 | - 'size' => '10%', |
|
89 | - 'minlength' => '3', |
|
90 | - 'maxlength' => '100', |
|
91 | - 'style' => 'width: 250px;' |
|
92 | - ], |
|
93 | - 'required' => true, |
|
94 | - 'disabled' => false, |
|
95 | - 'label' => false, |
|
96 | - 'trim' => true |
|
97 | - ] |
|
87 | + 'attr' => [ |
|
88 | + 'size' => '10%', |
|
89 | + 'minlength' => '3', |
|
90 | + 'maxlength' => '100', |
|
91 | + 'style' => 'width: 250px;' |
|
92 | + ], |
|
93 | + 'required' => true, |
|
94 | + 'disabled' => false, |
|
95 | + 'label' => false, |
|
96 | + 'trim' => true |
|
97 | + ] |
|
98 | 98 | ) |
99 | 99 | ->add( |
100 | 100 | 'plainPassword', RepeatedType::Class, [ |
101 | - 'options' => [ |
|
102 | - 'attr' => [ |
|
103 | - 'size' => '10%', |
|
104 | - 'minlength' => '8', |
|
105 | - 'maxlength' => '60', |
|
106 | - // TODO: pattern anpassen.Aktuell: Minimum eight characters, at least one letter, one number and one special character. |
|
101 | + 'options' => [ |
|
102 | + 'attr' => [ |
|
103 | + 'size' => '10%', |
|
104 | + 'minlength' => '8', |
|
105 | + 'maxlength' => '60', |
|
106 | + // TODO: pattern anpassen.Aktuell: Minimum eight characters, at least one letter, one number and one special character. |
|
107 | 107 | // 'pattern' => '^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$', |
108 | - 'style' => 'width: 250px;' |
|
109 | - ] |
|
110 | - ], |
|
111 | - // 'error_bubbling' => true, |
|
112 | - 'first_options' => ['label' => false, 'error_bubbling' => true], |
|
113 | - 'second_options' => ['label' => false], |
|
114 | - 'required' => true, |
|
115 | - 'disabled' => false, |
|
116 | - 'trim' => true, |
|
117 | - 'type' => PasswordType::class, |
|
118 | - 'invalid_message' => 'Your passwords do not match.', |
|
119 | - 'mapped' => false, |
|
108 | + 'style' => 'width: 250px;' |
|
109 | + ] |
|
110 | + ], |
|
111 | + // 'error_bubbling' => true, |
|
112 | + 'first_options' => ['label' => false, 'error_bubbling' => true], |
|
113 | + 'second_options' => ['label' => false], |
|
114 | + 'required' => true, |
|
115 | + 'disabled' => false, |
|
116 | + 'trim' => true, |
|
117 | + 'type' => PasswordType::class, |
|
118 | + 'invalid_message' => 'Your passwords do not match.', |
|
119 | + 'mapped' => false, |
|
120 | 120 | // 'constraints' => [ |
121 | 121 | // new NotBlank([ |
122 | 122 | // 'message' => 'Please enter a password', |
@@ -128,15 +128,15 @@ discard block |
||
128 | 128 | // 'max' => 60, |
129 | 129 | // ]), |
130 | 130 | // ], |
131 | - ] |
|
131 | + ] |
|
132 | 132 | ) |
133 | 133 | ->add( |
134 | 134 | 'tos', CheckboxType::class, [ |
135 | - 'attr' => [], |
|
136 | - 'label' => false, |
|
137 | - 'mapped' => false, |
|
138 | - 'required' => true, |
|
139 | - ] |
|
135 | + 'attr' => [], |
|
136 | + 'label' => false, |
|
137 | + 'mapped' => false, |
|
138 | + 'required' => true, |
|
139 | + ] |
|
140 | 140 | ) |
141 | 141 | ->add( |
142 | 142 | 'submit', SubmitType::class, [ |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | public function configureOptions(OptionsResolver $resolver) |
155 | 155 | : void { |
156 | 156 | $resolver->setDefaults([ |
157 | - 'countryList' => [], |
|
158 | - 'data_class' => UserEntity::class, |
|
159 | - ]); |
|
157 | + 'countryList' => [], |
|
158 | + 'data_class' => UserEntity::class, |
|
159 | + ]); |
|
160 | 160 | } |
161 | 161 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $databaseArray |
141 | 141 | ); |
142 | 142 | |
143 | - $entity->short = (int) $this->connection->lastInsertId(); |
|
143 | + $entity->short = (int)$this->connection->lastInsertId(); |
|
144 | 144 | |
145 | 145 | return $entity; |
146 | 146 | } |
@@ -249,17 +249,17 @@ discard block |
||
249 | 249 | public function getEntityFromDatabaseArray(array $data) |
250 | 250 | : CountriesEntity { |
251 | 251 | $entity = new CountriesEntity(); |
252 | - $entity->short = (string) $data['short']; |
|
253 | - $entity->name = (string) $data['name']; |
|
254 | - $entity->transId = (int) $data['trans_id']; |
|
255 | - $entity->de = (string) $data['de']; |
|
256 | - $entity->en = (string) $data['en']; |
|
257 | - $entity->listDefaultDe = (int) $data['list_default_de']; |
|
258 | - $entity->sortDe = (string) $data['sort_de']; |
|
259 | - $entity->listDefaultEn = (int) $data['list_default_en']; |
|
260 | - $entity->sortEn = (string) $data['sort_en']; |
|
261 | - $entity->admDisplay2 = (int) $data['adm_display2']; |
|
262 | - $entity->admDisplay3 = (int) $data['adm_display3']; |
|
252 | + $entity->short = (string)$data['short']; |
|
253 | + $entity->name = (string)$data['name']; |
|
254 | + $entity->transId = (int)$data['trans_id']; |
|
255 | + $entity->de = (string)$data['de']; |
|
256 | + $entity->en = (string)$data['en']; |
|
257 | + $entity->listDefaultDe = (int)$data['list_default_de']; |
|
258 | + $entity->sortDe = (string)$data['sort_de']; |
|
259 | + $entity->listDefaultEn = (int)$data['list_default_en']; |
|
260 | + $entity->sortEn = (string)$data['sort_en']; |
|
261 | + $entity->admDisplay2 = (int)$data['adm_display2']; |
|
262 | + $entity->admDisplay3 = (int)$data['adm_display3']; |
|
263 | 263 | |
264 | 264 | return $entity; |
265 | 265 | } |