@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @return string HTML code |
158 | 158 | * @throws \Aimeos\MW\View\Exception|\Aimeos\Client\Html\Exception |
159 | 159 | */ |
160 | - public function getBody(string $uid = ''): string |
|
160 | + public function getBody( string $uid = '' ): string |
|
161 | 161 | { |
162 | 162 | $view = $this->getView(); |
163 | 163 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | { |
205 | 205 | $view = $this->getView(); |
206 | 206 | |
207 | - if( !$view->param( 'account/save' , false) ) { |
|
207 | + if( !$view->param( 'account/save', false ) ) { |
|
208 | 208 | parent::process(); |
209 | 209 | return; |
210 | 210 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | /** @var \Aimeos\Controller\Frontend\Customer\Standard $cntl */ |
213 | 213 | $cntl = \Aimeos\Controller\Frontend::create( $this->getContext(), 'customer' ); |
214 | 214 | $oldPassword = $cntl->get()->getPassword(); |
215 | - $values = $view->param('account', []); |
|
215 | + $values = $view->param( 'account', [] ); |
|
216 | 216 | |
217 | 217 | $isNew = $values['customer.newpassword'] !== $values['customer.oldpassword']; |
218 | 218 | $confirmed = $values['customer.newpassword'] === $values['customer.confirmnewpassword']; |
@@ -221,39 +221,39 @@ discard block |
||
221 | 221 | |
222 | 222 | $isValid = true; |
223 | 223 | try { |
224 | - Validator::make([ |
|
224 | + Validator::make( [ |
|
225 | 225 | 'password' => $values['customer.newpassword'], |
226 | 226 | 'password_confirmation' => $values['customer.confirmnewpassword'] |
227 | 227 | ], [ |
228 | 228 | 'password' => ['required', 'string', new Password, 'confirmed'] |
229 | - ])->validate(); |
|
230 | - } catch (\Exception $ex) { |
|
229 | + ] )->validate(); |
|
230 | + } catch( \Exception $ex ) { |
|
231 | 231 | $isValid = false; |
232 | 232 | $errors['passwordRules'] = "The password does not meet the password requirements!"; |
233 | 233 | } |
234 | 234 | |
235 | - if ($isValid) { |
|
235 | + if( $isValid ) { |
|
236 | 236 | /** is the password realy new? */ |
237 | - if (!$isNew) { |
|
237 | + if( !$isNew ) { |
|
238 | 238 | $errors['isNew'] = "The given password is not new!"; |
239 | 239 | } |
240 | 240 | |
241 | 241 | /** does the confirm password is the same? */ |
242 | - if (!$confirmed) { |
|
242 | + if( !$confirmed ) { |
|
243 | 243 | $errors["confirm"] = "New passwords doesnt match!"; |
244 | 244 | } |
245 | 245 | |
246 | - $cntl = $cntl->add($values); |
|
246 | + $cntl = $cntl->add( $values ); |
|
247 | 247 | |
248 | 248 | } |
249 | 249 | /** if the pasword is new and confirmed, but is not changed, the given old password must be wrong */ |
250 | - if ($isValid && $isNew && $confirmed && $oldPassword === $cntl->get()->getPassword() ) { |
|
250 | + if( $isValid && $isNew && $confirmed && $oldPassword === $cntl->get()->getPassword() ) { |
|
251 | 251 | $errors['oldPassword'] = "Wrong password!"; |
252 | 252 | } |
253 | 253 | |
254 | - $view->passwordChanged = count(array_keys($errors)) === 0; |
|
254 | + $view->passwordChanged = count( array_keys( $errors ) ) === 0; |
|
255 | 255 | |
256 | - if (count(array_keys($errors)) > 0) { |
|
256 | + if( count( array_keys( $errors ) ) > 0 ) { |
|
257 | 257 | $view->passwordErrors = $errors; |
258 | 258 | } else { |
259 | 259 | $cntl->store(); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @see client/html/account/profile/url/config |
87 | 87 | */ |
88 | 88 | |
89 | -$passwordErrors = $this->get('passwordErrors', []); |
|
89 | +$passwordErrors = $this->get( 'passwordErrors', [] ); |
|
90 | 90 | |
91 | 91 | ?> |
92 | 92 | <?php $this->block()->start( 'account/profile/account' ) ?> |
@@ -97,10 +97,10 @@ discard block |
||
97 | 97 | <?= $this->csrf()->formfield() ?> |
98 | 98 | |
99 | 99 | <div class="row password-change-notifications"> |
100 | - <?php if ( $this->get('passwordChanged', null) === true ) : ?> |
|
101 | - <h2 class="text-success"><?= $this->translate('client', 'Password changed successfull!') ?></h2> |
|
102 | - <?php elseif ($this->get('passwordChanged', null) === false) : ?> |
|
103 | - <h2 class="text-danger"><?= $this->translate('client', 'Error(s) occured!') ?></h2> |
|
100 | + <?php if( $this->get( 'passwordChanged', null ) === true ) : ?> |
|
101 | + <h2 class="text-success"><?= $this->translate( 'client', 'Password changed successfull!' ) ?></h2> |
|
102 | + <?php elseif( $this->get( 'passwordChanged', null ) === false ) : ?> |
|
103 | + <h2 class="text-danger"><?= $this->translate( 'client', 'Error(s) occured!' ) ?></h2> |
|
104 | 104 | <?php endif ?> |
105 | 105 | </div> |
106 | 106 | <div class="row"> |
@@ -117,9 +117,9 @@ discard block |
||
117 | 117 | name="<?= $enc->attr( $this->formparam( array( 'account', 'customer.oldpassword' ) ) ) ?>" |
118 | 118 | placeholder="<?= $enc->attr( $this->translate( 'client', 'Old password' ) ) ?>" |
119 | 119 | > |
120 | - <?php if( isset($passwordErrors['oldPassword']) ) : ?> |
|
120 | + <?php if( isset( $passwordErrors['oldPassword'] ) ) : ?> |
|
121 | 121 | <span class="invalid-feedback d-block" role="alert"> |
122 | - <strong><?= $enc->html($this->translate('client', $passwordErrors['oldPassword'])) ?></strong> |
|
122 | + <strong><?= $enc->html( $this->translate( 'client', $passwordErrors['oldPassword'] ) ) ?></strong> |
|
123 | 123 | </span> |
124 | 124 | <?php endif ?> |
125 | 125 | </div> |
@@ -136,19 +136,19 @@ discard block |
||
136 | 136 | name="<?= $enc->attr( $this->formparam( array( 'account', 'customer.newpassword' ) ) ) ?>" |
137 | 137 | placeholder="<?= $enc->attr( $this->translate( 'client', 'New password' ) ) ?>" |
138 | 138 | > |
139 | - <?php if( isset($passwordErrors['confirm']) ) : ?> |
|
139 | + <?php if( isset( $passwordErrors['confirm'] ) ) : ?> |
|
140 | 140 | <span class="invalid-feedback d-block" role="alert"> |
141 | - <strong><?= $enc->html($this->translate('client', $passwordErrors['confirm'])) ?></strong> |
|
141 | + <strong><?= $enc->html( $this->translate( 'client', $passwordErrors['confirm'] ) ) ?></strong> |
|
142 | 142 | </span> |
143 | 143 | <?php endif ?> |
144 | - <?php if( isset($passwordErrors['isNew']) ) : ?> |
|
144 | + <?php if( isset( $passwordErrors['isNew'] ) ) : ?> |
|
145 | 145 | <span class="invalid-feedback d-block" role="alert"> |
146 | - <strong><?= $enc->html($this->translate('client', $passwordErrors['isNew'])) ?></strong> |
|
146 | + <strong><?= $enc->html( $this->translate( 'client', $passwordErrors['isNew'] ) ) ?></strong> |
|
147 | 147 | </span> |
148 | 148 | <?php endif ?> |
149 | - <?php if( isset($passwordErrors['passwordRules']) ) : ?> |
|
149 | + <?php if( isset( $passwordErrors['passwordRules'] ) ) : ?> |
|
150 | 150 | <span class="invalid-feedback d-block" role="alert"> |
151 | - <strong><?= $enc->html($this->translate('client', $passwordErrors['passwordRules'])) ?></strong> |
|
151 | + <strong><?= $enc->html( $this->translate( 'client', $passwordErrors['passwordRules'] ) ) ?></strong> |
|
152 | 152 | </span> |
153 | 153 | <?php endif ?> |
154 | 154 | </div> |
@@ -164,14 +164,14 @@ discard block |
||
164 | 164 | name="<?= $enc->attr( $this->formparam( array( 'account', 'customer.confirmnewpassword' ) ) ) ?>" |
165 | 165 | placeholder="<?= $enc->attr( $this->translate( 'client', 'Confirm password' ) ) ?>" |
166 | 166 | > |
167 | - <?php if( isset($passwordErrors['confirm']) ) : ?> |
|
167 | + <?php if( isset( $passwordErrors['confirm'] ) ) : ?> |
|
168 | 168 | <span class="invalid-feedback d-block" role="alert"> |
169 | - <strong><?= $enc->html($this->translate('client', $passwordErrors['confirm'])) ?></strong> |
|
169 | + <strong><?= $enc->html( $this->translate( 'client', $passwordErrors['confirm'] ) ) ?></strong> |
|
170 | 170 | </span> |
171 | 171 | <?php endif ?> |
172 | - <?php if( isset($passwordErrors['isNew']) ) : ?> |
|
172 | + <?php if( isset( $passwordErrors['isNew'] ) ) : ?> |
|
173 | 173 | <span class="invalid-feedback d-block" role="alert"> |
174 | - <strong><?= $enc->html($this->translate('client', $passwordErrors['isNew'])) ?></strong> |
|
174 | + <strong><?= $enc->html( $this->translate( 'client', $passwordErrors['isNew'] ) ) ?></strong> |
|
175 | 175 | </span> |
176 | 176 | <?php endif ?> |
177 | 177 | </div> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $this->pdf->setFont( 'dejavusans', '', 10 ); |
25 | 25 | |
26 | 26 | $vmargin = [ |
27 | - 'h1' => [ // HTML tag |
|
27 | + 'h1' => [// HTML tag |
|
28 | 28 | 0 => ['h' => 1.5, 'n' => 0], // space before = h * n |
29 | 29 | 1 => ['h' => 1.5, 'n' => 3] // space after = h * n |
30 | 30 | ], |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | $data = [ |
98 | 98 | 'BCD', // required |
99 | 99 | '002', // Version 2 (required, 1=UTF-8, 2=ISO 8859-1, 3=ISO 8859-2, 4=ISO 8859-4, 5=ISO 8859-5, 6=ISO 8859-7, 7=ISO 8859-10, 8=ISO 8859-15) |
100 | - 1, // UTF-8 (required) |
|
100 | + 1, // UTF-8 (required) |
|
101 | 101 | 'SCT', // SEPA Credit Transfer (required) |
102 | - '', // BIC (optional) |
|
103 | - '', // Name of recipient (required, name of your company) |
|
104 | - '', // IBAN (required) |
|
105 | - $this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required) |
|
106 | - '', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes) |
|
107 | - '', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code) |
|
102 | + '', // BIC (optional) |
|
103 | + '', // Name of recipient (required, name of your company) |
|
104 | + '', // IBAN (required) |
|
105 | + $this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required) |
|
106 | + '', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes) |
|
107 | + '', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code) |
|
108 | 108 | $this->translate( 'client', 'Order' ) . ' ' . $this->extOrderItem->getOrderNumber(), // Reference of order and other data (optional, max. 140 characters) |
109 | 109 | $this->extOrderBaseItem->getCustomerReference(), // Notice to the customer (optional, max. 70 characters) |
110 | 110 | ]; |