@@ -18,21 +18,21 @@ discard block |
||
18 | 18 | <div class="col-xl-12 content-block item-characteristic-property"> |
19 | 19 | |
20 | 20 | <table class="property-list table table-default" |
21 | - data-items="<?= $enc->attr( json_encode( $this->get( 'propertyData', [] ) ) ); ?>" |
|
22 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
21 | + data-items="<?= $enc->attr(json_encode($this->get('propertyData', []))); ?>" |
|
22 | + data-keys="<?= $enc->attr(json_encode($keys)) ?>" |
|
23 | 23 | data-siteid="<?= $this->site()->siteid() ?>" > |
24 | 24 | |
25 | 25 | <thead> |
26 | 26 | <tr> |
27 | 27 | <th colspan="3"> |
28 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Properties' ) ); ?></span> |
|
28 | + <span class="help"><?= $enc->html($this->translate('admin', 'Properties')); ?></span> |
|
29 | 29 | <div class="form-text text-muted help-text"> |
30 | - <?= $enc->html( $this->translate( 'admin', 'Product characteristics that are not shared with other products' ) ); ?> |
|
30 | + <?= $enc->html($this->translate('admin', 'Product characteristics that are not shared with other products')); ?> |
|
31 | 31 | </div> |
32 | 32 | </th> |
33 | 33 | <th class="actions"> |
34 | - <div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
35 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
34 | + <div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
35 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
36 | 36 | v-on:click="addItem('product.property.')"> |
37 | 37 | </div> |
38 | 38 | </th> |
@@ -44,16 +44,16 @@ discard block |
||
44 | 44 | <tr v-for="(entry, idx) in items" v-bind:key="idx" v-bind:class="checkSite('product.property.siteid', idx) ? 'readonly' : ''"> |
45 | 45 | <td class="property-type"> |
46 | 46 | <input class="item-id" type="hidden" v-bind:value="entry['product.property.id']" |
47 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'characteristic', 'property', 'idx', 'product.property.id' ) ) ); ?>'.replace('idx', idx)" /> |
|
47 | + v-bind:name="'<?= $enc->attr($this->formparam(array('characteristic', 'property', 'idx', 'product.property.id'))); ?>'.replace('idx', idx)" /> |
|
48 | 48 | |
49 | - <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
50 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'characteristic', 'property', 'idx', 'product.property.type' ) ) ); ?>'.replace('idx', idx)" |
|
49 | + <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
50 | + v-bind:name="'<?= $enc->attr($this->formparam(array('characteristic', 'property', 'idx', 'product.property.type'))); ?>'.replace('idx', idx)" |
|
51 | 51 | v-bind:readonly="checkSite('product.property.siteid', idx)" |
52 | 52 | v-model="items[idx]['product.property.type']" > |
53 | 53 | |
54 | - <?php foreach( $this->get( 'propertyTypes', [] ) as $id => $item ) : ?> |
|
55 | - <option value="<?= $enc->attr( $id ); ?>" v-bind:selected="entry['product.property.type'] == '<?= $enc->attr( $id ) ?>'" > |
|
56 | - <?= $enc->html( $item->getLabel() ); ?> |
|
54 | + <?php foreach ($this->get('propertyTypes', []) as $id => $item) : ?> |
|
55 | + <option value="<?= $enc->attr($id); ?>" v-bind:selected="entry['product.property.type'] == '<?= $enc->attr($id) ?>'" > |
|
56 | + <?= $enc->html($item->getLabel()); ?> |
|
57 | 57 | </option> |
58 | 58 | <?php endforeach; ?> |
59 | 59 | |
@@ -61,34 +61,34 @@ discard block |
||
61 | 61 | </td> |
62 | 62 | |
63 | 63 | <td class="property-language"> |
64 | - <select class="form-control custom-select item-languageid" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
65 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'characteristic', 'property', 'idx', 'product.property.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
64 | + <select class="form-control custom-select item-languageid" tabindex="<?= $this->get('tabindex'); ?>" |
|
65 | + v-bind:name="'<?= $enc->attr($this->formparam(array('characteristic', 'property', 'idx', 'product.property.languageid'))); ?>'.replace('idx', idx)" |
|
66 | 66 | v-bind:readonly="checkSite('product.property.siteid', idx)" |
67 | 67 | v-model="items[idx]['product.property.languageid']" > |
68 | 68 | |
69 | 69 | <option v-bind:value="null"> |
70 | - <?= $enc->html( $this->translate( 'admin', 'All' ) ); ?> |
|
70 | + <?= $enc->html($this->translate('admin', 'All')); ?> |
|
71 | 71 | </option> |
72 | 72 | |
73 | - <?php foreach( $this->get( 'pageLangItems', [] ) as $langId => $langItem ) : ?> |
|
74 | - <option value="<?= $enc->attr( $langId ); ?>" v-bind:selected="entry['product.property.languageid'] == '<?= $enc->attr( $langId ) ?>'" > |
|
75 | - <?= $enc->html( $langItem->getLabel() ); ?> |
|
73 | + <?php foreach ($this->get('pageLangItems', []) as $langId => $langItem) : ?> |
|
74 | + <option value="<?= $enc->attr($langId); ?>" v-bind:selected="entry['product.property.languageid'] == '<?= $enc->attr($langId) ?>'" > |
|
75 | + <?= $enc->html($langItem->getLabel()); ?> |
|
76 | 76 | </option> |
77 | 77 | <?php endforeach; ?> |
78 | 78 | </select> |
79 | 79 | </td> |
80 | 80 | |
81 | 81 | <td class="property-value"> |
82 | - <input class="form-control item-value" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
83 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'characteristic', 'property', 'idx', 'product.property.value' ) ) ); ?>'.replace('idx', idx)" |
|
84 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Property value (required)' ) ); ?>" |
|
82 | + <input class="form-control item-value" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
83 | + v-bind:name="'<?= $enc->attr($this->formparam(array('characteristic', 'property', 'idx', 'product.property.value'))); ?>'.replace('idx', idx)" |
|
84 | + placeholder="<?= $enc->attr($this->translate('admin', 'Property value (required)')); ?>" |
|
85 | 85 | v-bind:readonly="checkSite('product.property.siteid', idx)" |
86 | 86 | v-model="items[idx]['product.property.value']" > |
87 | 87 | </td> |
88 | 88 | |
89 | 89 | <td class="actions"> |
90 | - <div v-if="!checkSite('product.property.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
91 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
90 | + <div v-if="!checkSite('product.property.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
91 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
92 | 92 | v-on:click.stop="removeItem(idx)"> |
93 | 93 | </div> |
94 | 94 | </td> |
@@ -97,6 +97,6 @@ discard block |
||
97 | 97 | </tbody> |
98 | 98 | </table> |
99 | 99 | |
100 | - <?= $this->get( 'propertyBody' ); ?> |
|
100 | + <?= $this->get('propertyBody'); ?> |
|
101 | 101 | |
102 | 102 | </div> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @see admin/jqadm/url/search/action |
23 | 23 | * @see admin/jqadm/url/search/config |
24 | 24 | */ |
25 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
25 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
26 | 26 | |
27 | 27 | /** admin/jqadm/url/search/controller |
28 | 28 | * Name of the controller whose action should be called |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @see admin/jqadm/url/search/action |
39 | 39 | * @see admin/jqadm/url/search/config |
40 | 40 | */ |
41 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
41 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
42 | 42 | |
43 | 43 | /** admin/jqadm/url/search/action |
44 | 44 | * Name of the action that should create the output |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @see admin/jqadm/url/search/controller |
55 | 55 | * @see admin/jqadm/url/search/config |
56 | 56 | */ |
57 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
57 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
58 | 58 | |
59 | 59 | /** admin/jqadm/url/search/config |
60 | 60 | * Associative list of configuration options used for generating the URL |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @see admin/jqadm/url/search/controller |
77 | 77 | * @see admin/jqadm/url/search/action |
78 | 78 | */ |
79 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
79 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
80 | 80 | |
81 | 81 | |
82 | 82 | /** admin/jqadm/url/create/target |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @see admin/jqadm/url/create/action |
94 | 94 | * @see admin/jqadm/url/create/config |
95 | 95 | */ |
96 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
96 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
97 | 97 | |
98 | 98 | /** admin/jqadm/url/create/controller |
99 | 99 | * Name of the controller whose action should be called |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @see admin/jqadm/url/create/action |
110 | 110 | * @see admin/jqadm/url/create/config |
111 | 111 | */ |
112 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
112 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
113 | 113 | |
114 | 114 | /** admin/jqadm/url/create/action |
115 | 115 | * Name of the action that should create the output |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * @see admin/jqadm/url/create/controller |
126 | 126 | * @see admin/jqadm/url/create/config |
127 | 127 | */ |
128 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
128 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
129 | 129 | |
130 | 130 | /** admin/jqadm/url/create/config |
131 | 131 | * Associative list of configuration options used for generating the URL |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @see admin/jqadm/url/create/controller |
148 | 148 | * @see admin/jqadm/url/create/action |
149 | 149 | */ |
150 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
150 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
151 | 151 | |
152 | 152 | |
153 | 153 | /** admin/jqadm/url/get/target |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @see admin/jqadm/url/get/action |
165 | 165 | * @see admin/jqadm/url/get/config |
166 | 166 | */ |
167 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
167 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
168 | 168 | |
169 | 169 | /** admin/jqadm/url/get/controller |
170 | 170 | * Name of the controller whose action should be called |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | * @see admin/jqadm/url/get/action |
181 | 181 | * @see admin/jqadm/url/get/config |
182 | 182 | */ |
183 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
183 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
184 | 184 | |
185 | 185 | /** admin/jqadm/url/get/action |
186 | 186 | * Name of the action that should create the output |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * @see admin/jqadm/url/get/controller |
197 | 197 | * @see admin/jqadm/url/get/config |
198 | 198 | */ |
199 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
199 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
200 | 200 | |
201 | 201 | /** admin/jqadm/url/get/config |
202 | 202 | * Associative list of configuration options used for generating the URL |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @see admin/jqadm/url/get/controller |
219 | 219 | * @see admin/jqadm/url/get/action |
220 | 220 | */ |
221 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
221 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
222 | 222 | |
223 | 223 | |
224 | 224 | /** admin/jqadm/url/copy/target |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * @see admin/jqadm/url/copy/action |
236 | 236 | * @see admin/jqadm/url/copy/config |
237 | 237 | */ |
238 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
238 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
239 | 239 | |
240 | 240 | /** admin/jqadm/url/copy/controller |
241 | 241 | * Name of the controller whose action should be called |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * @see admin/jqadm/url/copy/action |
252 | 252 | * @see admin/jqadm/url/copy/config |
253 | 253 | */ |
254 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
254 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
255 | 255 | |
256 | 256 | /** admin/jqadm/url/copy/action |
257 | 257 | * Name of the action that should create the output |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | * @see admin/jqadm/url/copy/controller |
268 | 268 | * @see admin/jqadm/url/copy/config |
269 | 269 | */ |
270 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
270 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
271 | 271 | |
272 | 272 | /** admin/jqadm/url/copy/config |
273 | 273 | * Associative list of configuration options used for generating the URL |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * @see admin/jqadm/url/copy/controller |
290 | 290 | * @see admin/jqadm/url/copy/action |
291 | 291 | */ |
292 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
292 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
293 | 293 | |
294 | 294 | |
295 | 295 | /** admin/jqadm/url/delete/target |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * @see admin/jqadm/url/delete/action |
307 | 307 | * @see admin/jqadm/url/delete/config |
308 | 308 | */ |
309 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
309 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
310 | 310 | |
311 | 311 | /** admin/jqadm/url/delete/controller |
312 | 312 | * Name of the controller whose action should be called |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | * @see admin/jqadm/url/delete/action |
323 | 323 | * @see admin/jqadm/url/delete/config |
324 | 324 | */ |
325 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
325 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
326 | 326 | |
327 | 327 | /** admin/jqadm/url/delete/action |
328 | 328 | * Name of the action that should create the output |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | * @see admin/jqadm/url/delete/controller |
339 | 339 | * @see admin/jqadm/url/delete/config |
340 | 340 | */ |
341 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
341 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
342 | 342 | |
343 | 343 | /** admin/jqadm/url/delete/config |
344 | 344 | * Associative list of configuration options used for generating the URL |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | * @see admin/jqadm/url/delete/controller |
361 | 361 | * @see admin/jqadm/url/delete/action |
362 | 362 | */ |
363 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
363 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
364 | 364 | |
365 | 365 | |
366 | 366 | /** admin/jqadm/partial/columns |
@@ -509,47 +509,47 @@ discard block |
||
509 | 509 | * @since 2016.04 |
510 | 510 | * @category Developer |
511 | 511 | */ |
512 | -$default = $this->config( 'admin/jqadm/product/fields', ['product.id', 'product.status', 'product.type', 'product.code', 'product.label'] ); |
|
513 | -$fields = $this->session( 'aimeos/admin/jqadm/product/fields', $default ); |
|
512 | +$default = $this->config('admin/jqadm/product/fields', ['product.id', 'product.status', 'product.type', 'product.code', 'product.label']); |
|
513 | +$fields = $this->session('aimeos/admin/jqadm/product/fields', $default); |
|
514 | 514 | |
515 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
515 | +$searchParams = $params = $this->get('pageParams', []); |
|
516 | 516 | $searchParams['page']['start'] = 0; |
517 | 517 | |
518 | 518 | $typeList = []; |
519 | -foreach( $this->get( 'itemTypes', [] ) as $typeItem ) { |
|
519 | +foreach ($this->get('itemTypes', []) as $typeItem) { |
|
520 | 520 | $typeList[$typeItem->getCode()] = $typeItem->getCode(); |
521 | 521 | } |
522 | 522 | |
523 | 523 | $columnList = [ |
524 | - 'product.id' => $this->translate( 'admin', 'ID' ), |
|
525 | - 'product.status' => $this->translate( 'admin', 'Status' ), |
|
526 | - 'product.type' => $this->translate( 'admin', 'Type' ), |
|
527 | - 'product.code' => $this->translate( 'admin', 'Code' ), |
|
528 | - 'product.label' => $this->translate( 'admin', 'Label' ), |
|
529 | - 'product.datestart' => $this->translate( 'admin', 'Start date' ), |
|
530 | - 'product.dateend' => $this->translate( 'admin', 'End date' ), |
|
531 | - 'product.config' => $this->translate( 'admin', 'Config' ), |
|
532 | - 'product.ctime' => $this->translate( 'admin', 'Created' ), |
|
533 | - 'product.mtime' => $this->translate( 'admin', 'Modified' ), |
|
534 | - 'product.editor' => $this->translate( 'admin', 'Editor' ), |
|
524 | + 'product.id' => $this->translate('admin', 'ID'), |
|
525 | + 'product.status' => $this->translate('admin', 'Status'), |
|
526 | + 'product.type' => $this->translate('admin', 'Type'), |
|
527 | + 'product.code' => $this->translate('admin', 'Code'), |
|
528 | + 'product.label' => $this->translate('admin', 'Label'), |
|
529 | + 'product.datestart' => $this->translate('admin', 'Start date'), |
|
530 | + 'product.dateend' => $this->translate('admin', 'End date'), |
|
531 | + 'product.config' => $this->translate('admin', 'Config'), |
|
532 | + 'product.ctime' => $this->translate('admin', 'Created'), |
|
533 | + 'product.mtime' => $this->translate('admin', 'Modified'), |
|
534 | + 'product.editor' => $this->translate('admin', 'Editor'), |
|
535 | 535 | ]; |
536 | 536 | |
537 | 537 | |
538 | 538 | ?> |
539 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
539 | +<?php $this->block()->start('jqadm_content'); ?> |
|
540 | 540 | |
541 | 541 | <nav class="main-navbar"> |
542 | 542 | |
543 | 543 | <span class="navbar-brand"> |
544 | - <?= $enc->html( $this->translate( 'admin', 'Product' ) ); ?> |
|
545 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
544 | + <?= $enc->html($this->translate('admin', 'Product')); ?> |
|
545 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
546 | 546 | </span> |
547 | 547 | |
548 | 548 | <?= $this->partial( |
549 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [ |
|
550 | - 'filter' => $this->session( 'aimeos/admin/jqadm/product/filter', [] ), |
|
551 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
552 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
549 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [ |
|
550 | + 'filter' => $this->session('aimeos/admin/jqadm/product/filter', []), |
|
551 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
552 | + 'filterOperators' => $this->get('filterOperators', []), |
|
553 | 553 | 'params' => $params, |
554 | 554 | ] |
555 | 555 | ); ?> |
@@ -557,34 +557,34 @@ discard block |
||
557 | 557 | |
558 | 558 | |
559 | 559 | <?= $this->partial( |
560 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
561 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
562 | - 'page' =>$this->session( 'aimeos/admin/jqadm/product/page', [] )] |
|
560 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
561 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
562 | + 'page' =>$this->session('aimeos/admin/jqadm/product/page', [])] |
|
563 | 563 | ); |
564 | 564 | ?> |
565 | 565 | |
566 | -<form class="list list-product" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
566 | +<form class="list list-product" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
567 | 567 | <?= $this->csrf()->formfield(); ?> |
568 | 568 | |
569 | 569 | <table class="list-items table table-hover table-striped"> |
570 | 570 | <thead class="list-header"> |
571 | 571 | <tr> |
572 | 572 | <?= $this->partial( |
573 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ), |
|
573 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'), |
|
574 | 574 | ['fields' => $fields, 'params' => $params, 'data' => $columnList, |
575 | - 'sort' => $this->session( 'aimeos/admin/jqadm/product/sort', 'product.id' )] |
|
575 | + 'sort' => $this->session('aimeos/admin/jqadm/product/sort', 'product.id')] |
|
576 | 576 | ); |
577 | 577 | ?> |
578 | 578 | |
579 | 579 | <th class="actions"> |
580 | 580 | <a class="btn fa act-add" tabindex="1" |
581 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
582 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
583 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
581 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
582 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
583 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
584 | 584 | </a> |
585 | 585 | |
586 | 586 | <?= $this->partial( |
587 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ), |
|
587 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'), |
|
588 | 588 | ['fields' => $fields, 'data' => $columnList] |
589 | 589 | ); |
590 | 590 | ?> |
@@ -594,15 +594,15 @@ discard block |
||
594 | 594 | <tbody> |
595 | 595 | |
596 | 596 | <?= $this->partial( |
597 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [ |
|
598 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/product/filter', [] ), |
|
597 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [ |
|
598 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/product/filter', []), |
|
599 | 599 | 'data' => [ |
600 | 600 | 'product.id' => ['op' => '=='], |
601 | 601 | 'product.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
602 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
603 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
604 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
605 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
602 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
603 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
604 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
605 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
606 | 606 | ]], |
607 | 607 | 'product.type' => ['op' => '==', 'type' => 'select', 'val' => $typeList], |
608 | 608 | 'product.code' => [], |
@@ -617,61 +617,61 @@ discard block |
||
617 | 617 | ] ); |
618 | 618 | ?> |
619 | 619 | |
620 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
621 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
622 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
623 | - <?php if( in_array( 'product.id', $fields ) ) : ?> |
|
624 | - <td class="product-id"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getId() ); ?></a></td> |
|
620 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
621 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
622 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
623 | + <?php if (in_array('product.id', $fields)) : ?> |
|
624 | + <td class="product-id"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getId()); ?></a></td> |
|
625 | 625 | <?php endif; ?> |
626 | - <?php if( in_array( 'product.status', $fields ) ) : ?> |
|
627 | - <td class="product-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
626 | + <?php if (in_array('product.status', $fields)) : ?> |
|
627 | + <td class="product-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
628 | 628 | <?php endif; ?> |
629 | - <?php if( in_array( 'product.type', $fields ) ) : ?> |
|
630 | - <td class="product-type"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getType() ); ?></a></td> |
|
629 | + <?php if (in_array('product.type', $fields)) : ?> |
|
630 | + <td class="product-type"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getType()); ?></a></td> |
|
631 | 631 | <?php endif; ?> |
632 | - <?php if( in_array( 'product.code', $fields ) ) : ?> |
|
633 | - <td class="product-code"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
632 | + <?php if (in_array('product.code', $fields)) : ?> |
|
633 | + <td class="product-code"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getCode()); ?></a></td> |
|
634 | 634 | <?php endif; ?> |
635 | - <?php if( in_array( 'product.label', $fields ) ) : ?> |
|
636 | - <td class="product-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
635 | + <?php if (in_array('product.label', $fields)) : ?> |
|
636 | + <td class="product-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
637 | 637 | <?php endif; ?> |
638 | - <?php if( in_array( 'product.datestart', $fields ) ) : ?> |
|
639 | - <td class="product-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateStart() ); ?></a></td> |
|
638 | + <?php if (in_array('product.datestart', $fields)) : ?> |
|
639 | + <td class="product-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateStart()); ?></a></td> |
|
640 | 640 | <?php endif; ?> |
641 | - <?php if( in_array( 'product.dateend', $fields ) ) : ?> |
|
642 | - <td class="product-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateEnd() ); ?></a></td> |
|
641 | + <?php if (in_array('product.dateend', $fields)) : ?> |
|
642 | + <td class="product-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateEnd()); ?></a></td> |
|
643 | 643 | <?php endif; ?> |
644 | - <?php if( in_array( 'product.config', $fields ) ) : ?> |
|
644 | + <?php if (in_array('product.config', $fields)) : ?> |
|
645 | 645 | <td class="product-config config-item"> |
646 | 646 | <a class="items-field" href="<?= $url; ?>"> |
647 | - <?php foreach( $item->getConfig() as $key => $value ) : ?> |
|
648 | - <span class="config-key"><?= $enc->html( $key ); ?></span> |
|
649 | - <span class="config-value"><?= $enc->html( !is_scalar( $value ) ? json_encode( $value ) : $value ); ?></span> |
|
647 | + <?php foreach ($item->getConfig() as $key => $value) : ?> |
|
648 | + <span class="config-key"><?= $enc->html($key); ?></span> |
|
649 | + <span class="config-value"><?= $enc->html(!is_scalar($value) ? json_encode($value) : $value); ?></span> |
|
650 | 650 | <br/> |
651 | 651 | <?php endforeach; ?> |
652 | 652 | </a> |
653 | 653 | </td> |
654 | 654 | <?php endif; ?> |
655 | - <?php if( in_array( 'product.ctime', $fields ) ) : ?> |
|
656 | - <td class="product-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
655 | + <?php if (in_array('product.ctime', $fields)) : ?> |
|
656 | + <td class="product-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
657 | 657 | <?php endif; ?> |
658 | - <?php if( in_array( 'product.mtime', $fields ) ) : ?> |
|
659 | - <td class="product-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
658 | + <?php if (in_array('product.mtime', $fields)) : ?> |
|
659 | + <td class="product-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
660 | 660 | <?php endif; ?> |
661 | - <?php if( in_array( 'product.editor', $fields ) ) : ?> |
|
662 | - <td class="product-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
661 | + <?php if (in_array('product.editor', $fields)) : ?> |
|
662 | + <td class="product-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
663 | 663 | <?php endif; ?> |
664 | 664 | |
665 | 665 | <td class="actions"> |
666 | 666 | <a class="btn act-copy fa" tabindex="1" |
667 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
668 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
669 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
670 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
667 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
668 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
669 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
670 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
671 | 671 | <a class="btn act-delete fa" tabindex="1" |
672 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'product', 'id' => $id] + $params, [], $delConfig ) ); ?>" |
|
673 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
674 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
672 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'product', 'id' => $id] + $params, [], $delConfig)); ?>" |
|
673 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
674 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
675 | 675 | <?php endif; ?> |
676 | 676 | </td> |
677 | 677 | </tr> |
@@ -679,18 +679,18 @@ discard block |
||
679 | 679 | </tbody> |
680 | 680 | </table> |
681 | 681 | |
682 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
683 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
682 | + <?php if ($this->get('items', []) === []) : ?> |
|
683 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
684 | 684 | <?php endif; ?> |
685 | 685 | </form> |
686 | 686 | |
687 | 687 | <?= $this->partial( |
688 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
689 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
690 | - 'page' => $this->session( 'aimeos/admin/jqadm/product/page', [] )] |
|
688 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
689 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
690 | + 'page' => $this->session('aimeos/admin/jqadm/product/page', [])] |
|
691 | 691 | ); |
692 | 692 | ?> |
693 | 693 | |
694 | 694 | <?php $this->block()->stop(); ?> |
695 | 695 | |
696 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?> |
|
696 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?> |
@@ -13,15 +13,15 @@ discard block |
||
13 | 13 | 'price.siteid', 'price.type', 'price.currencyid', 'price.status', 'price.quantity', 'price.taxrate', 'price.value', 'price.rebate', 'price.costs' |
14 | 14 | ]; |
15 | 15 | |
16 | -$currencies = $this->get( 'priceCurrencies', [] ); |
|
16 | +$currencies = $this->get('priceCurrencies', []); |
|
17 | 17 | |
18 | 18 | |
19 | 19 | ?> |
20 | 20 | <div id="price" class="item-price content-block tab-pane fade" role="tablist" aria-labelledby="price"> |
21 | 21 | <div id="item-price-group" role="tablist" aria-multiselectable="true" |
22 | - data-items="<?= $enc->attr( json_encode( $this->get( 'priceData', [] ) ) ); ?>" |
|
23 | - data-listtype="<?= key( $this->get( 'priceListTypes', [] ) ) ?>" |
|
24 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
22 | + data-items="<?= $enc->attr(json_encode($this->get('priceData', []))); ?>" |
|
23 | + data-listtype="<?= key($this->get('priceListTypes', [])) ?>" |
|
24 | + data-keys="<?= $enc->attr(json_encode($keys)) ?>" |
|
25 | 25 | data-siteid="<?= $this->site()->siteid() ?>" > |
26 | 26 | |
27 | 27 | <div v-for="(entry, idx) in items" class="group-item card"> |
@@ -30,16 +30,16 @@ discard block |
||
30 | 30 | v-bind:data-target="'#item-price-group-data-' + idx" data-toggle="collapse" role="tab" class="card-header header" |
31 | 31 | v-bind:aria-controls="'item-price-group-data-' + idx" aria-expanded="false"> |
32 | 32 | <div class="card-tools-left"> |
33 | - <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
34 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry') ); ?>"> |
|
33 | + <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
34 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>"> |
|
35 | 35 | </div> |
36 | 36 | </div> |
37 | 37 | <span class="item-label header-label" v-html="getLabel(idx)"></span> |
38 | 38 | |
39 | 39 | <div class="card-tools-right"> |
40 | 40 | <div v-if="!checkSite('product.lists.siteid', idx)" |
41 | - class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
42 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
41 | + class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
42 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
43 | 43 | v-on:click.stop="removeItem(idx)"> |
44 | 44 | </div> |
45 | 45 | </div> |
@@ -49,60 +49,60 @@ discard block |
||
49 | 49 | v-bind:aria-labelledby="'item-price-group-item-' + idx" role="tabpanel" class="card-block collapse row"> |
50 | 50 | |
51 | 51 | <input type="hidden" v-model="items[idx]['price.id']" |
52 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.id' ) ) ); ?>'.replace('idx', idx)" /> |
|
52 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.id'))); ?>'.replace('idx', idx)" /> |
|
53 | 53 | |
54 | 54 | <div class="col-xl-6"> |
55 | 55 | |
56 | 56 | <div class="form-group row mandatory"> |
57 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Tax rate in %' ) ); ?></label> |
|
57 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Tax rate in %')); ?></label> |
|
58 | 58 | <div class="col-sm-8"> |
59 | - <input class="form-control item-taxrate" type="number" step="0.01" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
60 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.taxrate' ) ) ); ?>'.replace('idx', idx)" |
|
61 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Tax rate in %' ) ); ?>" |
|
59 | + <input class="form-control item-taxrate" type="number" step="0.01" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
60 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.taxrate'))); ?>'.replace('idx', idx)" |
|
61 | + placeholder="<?= $enc->attr($this->translate('admin', 'Tax rate in %')); ?>" |
|
62 | 62 | v-bind:readonly="checkSite('price.siteid', idx)" |
63 | 63 | v-model="items[idx]['price.taxrate']" /> |
64 | 64 | </div> |
65 | 65 | <div class="col-sm-12 form-text text-muted help-text"> |
66 | - <?= $enc->html( $this->translate( 'admin', 'Country specific tax rate to calculate and display the included tax (B2C) or add the tax if required (B2B)' ) ); ?> |
|
66 | + <?= $enc->html($this->translate('admin', 'Country specific tax rate to calculate and display the included tax (B2C) or add the tax if required (B2B)')); ?> |
|
67 | 67 | </div> |
68 | 68 | </div> |
69 | 69 | <div class="form-group row mandatory"> |
70 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Actual current price' ) ); ?></label> |
|
70 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Actual current price')); ?></label> |
|
71 | 71 | <div class="col-sm-8"> |
72 | - <input class="form-control item-value" type="number" step="0.01" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
73 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.value' ) ) ); ?>'.replace('idx', idx)" |
|
74 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Actual current price' ) ); ?>" |
|
72 | + <input class="form-control item-value" type="number" step="0.01" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
73 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.value'))); ?>'.replace('idx', idx)" |
|
74 | + placeholder="<?= $enc->attr($this->translate('admin', 'Actual current price')); ?>" |
|
75 | 75 | v-bind:readonly="checkSite('price.siteid', idx)" |
76 | 76 | v-model="items[idx]['price.value']" /> |
77 | 77 | </div> |
78 | 78 | <div class="col-sm-12 form-text text-muted help-text"> |
79 | - <?= $enc->html( $this->translate( 'admin', 'Actual price customers can buy the article for on the web site' ) ); ?> |
|
79 | + <?= $enc->html($this->translate('admin', 'Actual price customers can buy the article for on the web site')); ?> |
|
80 | 80 | </div> |
81 | 81 | </div> |
82 | 82 | <div class="form-group row optional"> |
83 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Substracted rebate amount' ) ); ?></label> |
|
83 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Substracted rebate amount')); ?></label> |
|
84 | 84 | <div class="col-sm-8"> |
85 | - <input class="form-control item-rebate" type="number" step="0.01" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
86 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.rebate' ) ) ); ?>'.replace('idx', idx)" |
|
87 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Substracted rebate amount' ) ); ?>" |
|
85 | + <input class="form-control item-rebate" type="number" step="0.01" tabindex="<?= $this->get('tabindex'); ?>" |
|
86 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.rebate'))); ?>'.replace('idx', idx)" |
|
87 | + placeholder="<?= $enc->attr($this->translate('admin', 'Substracted rebate amount')); ?>" |
|
88 | 88 | v-bind:readonly="checkSite('price.siteid', idx)" |
89 | 89 | v-model="items[idx]['price.rebate']" /> |
90 | 90 | </div> |
91 | 91 | <div class="col-sm-12 form-text text-muted help-text"> |
92 | - <?= $enc->html( $this->translate( 'admin', 'Reduction from the original price, used to calculate the rebate in % and the cross price' ) ); ?> |
|
92 | + <?= $enc->html($this->translate('admin', 'Reduction from the original price, used to calculate the rebate in % and the cross price')); ?> |
|
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | <div class="form-group row optional"> |
96 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Shipping costs per item' ) ); ?></label> |
|
96 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Shipping costs per item')); ?></label> |
|
97 | 97 | <div class="col-sm-8"> |
98 | - <input class="form-control item-costs" type="number" step="0.01" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
99 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.costs' ) ) ); ?>'.replace('idx', idx)" |
|
100 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Shipping costs per item' ) ); ?>" |
|
98 | + <input class="form-control item-costs" type="number" step="0.01" tabindex="<?= $this->get('tabindex'); ?>" |
|
99 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.costs'))); ?>'.replace('idx', idx)" |
|
100 | + placeholder="<?= $enc->attr($this->translate('admin', 'Shipping costs per item')); ?>" |
|
101 | 101 | v-bind:readonly="checkSite('price.siteid', idx)" |
102 | 102 | v-model="items[idx]['price.costs']" /> |
103 | 103 | </div> |
104 | 104 | <div class="col-sm-12 form-text text-muted help-text"> |
105 | - <?= $enc->html( $this->translate( 'admin', 'Additional delivery costs for each item, e.g. $20 for one heavy item will be $100 for five items it total' ) ); ?> |
|
105 | + <?= $enc->html($this->translate('admin', 'Additional delivery costs for each item, e.g. $20 for one heavy item will be $100 for five items it total')); ?> |
|
106 | 106 | </div> |
107 | 107 | </div> |
108 | 108 | |
@@ -111,43 +111,43 @@ discard block |
||
111 | 111 | <div class="col-xl-6"> |
112 | 112 | |
113 | 113 | <div class="form-group row mandatory"> |
114 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
114 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
115 | 115 | <div class="col-sm-8"> |
116 | - <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
117 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.status' ) ) ); ?>'.replace('idx', idx)" |
|
116 | + <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
117 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.status'))); ?>'.replace('idx', idx)" |
|
118 | 118 | v-bind:readonly="checkSite('price.siteid', idx)" |
119 | 119 | v-model="items[idx]['price.status']" > |
120 | 120 | <option value="1" v-bind:selected="items[idx]['price.status'] == 1" > |
121 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
121 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
122 | 122 | </option> |
123 | 123 | <option value="0" v-bind:selected="items[idx]['price.status'] == 0" > |
124 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
124 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
125 | 125 | </option> |
126 | 126 | <option value="-1" v-bind:selected="items[idx]['price.status'] == -1" > |
127 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
127 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
128 | 128 | </option> |
129 | 129 | <option value="-2" v-bind:selected="items[idx]['price.status'] == -2" > |
130 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
130 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
131 | 131 | </option> |
132 | 132 | </select> |
133 | 133 | </div> |
134 | 134 | </div> |
135 | 135 | |
136 | - <?php if( count( $currencies ) > 1 ) : ?> |
|
136 | + <?php if (count($currencies) > 1) : ?> |
|
137 | 137 | <div class="form-group row mandatory"> |
138 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Currency' ) ); ?></label> |
|
138 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Currency')); ?></label> |
|
139 | 139 | <div class="col-sm-8"> |
140 | - <select class="form-control custom-select item-currencyid" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
141 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); ?>'.replace('idx', idx)" |
|
140 | + <select class="form-control custom-select item-currencyid" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
141 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.currencyid'))); ?>'.replace('idx', idx)" |
|
142 | 142 | v-bind:readonly="checkSite('price.siteid', idx)" |
143 | 143 | v-model="items[idx]['price.currencyid']" > |
144 | 144 | <option value="" disabled> |
145 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
145 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
146 | 146 | </option> |
147 | 147 | |
148 | - <?php foreach( $currencies as $currencyId => $currencyItem ) : ?> |
|
149 | - <option value="<?= $enc->attr( $currencyItem->getCode() ); ?>" v-bind:selected="items[idx]['price.currencyid'] == '<?= $enc->attr( $currencyId ) ?>'" > |
|
150 | - <?= $enc->html( $currencyItem->getCode() ); ?> |
|
148 | + <?php foreach ($currencies as $currencyId => $currencyItem) : ?> |
|
149 | + <option value="<?= $enc->attr($currencyItem->getCode()); ?>" v-bind:selected="items[idx]['price.currencyid'] == '<?= $enc->attr($currencyId) ?>'" > |
|
150 | + <?= $enc->html($currencyItem->getCode()); ?> |
|
151 | 151 | </option> |
152 | 152 | <?php endforeach; ?> |
153 | 153 | |
@@ -156,51 +156,51 @@ discard block |
||
156 | 156 | </div> |
157 | 157 | <?php else : ?> |
158 | 158 | <input class="item-currencyid" type="hidden" |
159 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); ?>'.replace('idx', idx)" |
|
160 | - value="<?= $enc->attr( key( $currencies ) ); ?>" /> |
|
159 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.currencyid'))); ?>'.replace('idx', idx)" |
|
160 | + value="<?= $enc->attr(key($currencies)); ?>" /> |
|
161 | 161 | <?php endif; ?> |
162 | 162 | |
163 | - <?php $priceTypes = $this->get( 'priceTypes', [] ); ?> |
|
164 | - <?php if( count( $priceTypes ) > 1 ) : ?> |
|
163 | + <?php $priceTypes = $this->get('priceTypes', []); ?> |
|
164 | + <?php if (count($priceTypes) > 1) : ?> |
|
165 | 165 | <div class="form-group row mandatory"> |
166 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Type' ) ); ?></label> |
|
166 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Type')); ?></label> |
|
167 | 167 | <div class="col-sm-8"> |
168 | - <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
169 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); ?>'.replace('idx', idx)" |
|
168 | + <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
169 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.type'))); ?>'.replace('idx', idx)" |
|
170 | 170 | v-bind:readonly="checkSite('price.siteid', idx)" |
171 | 171 | v-model="items[idx]['price.type']" > |
172 | 172 | <option value=""> |
173 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
173 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
174 | 174 | </option> |
175 | 175 | |
176 | - <?php foreach( (array) $priceTypes as $typeItem ) : ?> |
|
177 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" v-bind:selected="items[idx]['price.type'] == '<?= $enc->attr( $typeItem->getCode() ) ?>'" > |
|
178 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
176 | + <?php foreach ((array) $priceTypes as $typeItem) : ?> |
|
177 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" v-bind:selected="items[idx]['price.type'] == '<?= $enc->attr($typeItem->getCode()) ?>'" > |
|
178 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
179 | 179 | </option> |
180 | 180 | <?php endforeach; ?> |
181 | 181 | </select> |
182 | 182 | </div> |
183 | 183 | <div class="col-sm-12 form-text text-muted help-text"> |
184 | - <?= $enc->html( $this->translate( 'admin', 'Types for additional prices like per one lb/kg or per month' ) ); ?> |
|
184 | + <?= $enc->html($this->translate('admin', 'Types for additional prices like per one lb/kg or per month')); ?> |
|
185 | 185 | </div> |
186 | 186 | </div> |
187 | 187 | <?php else : ?> |
188 | 188 | <input class="item-type" type="hidden" |
189 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); ?>'.replace('idx', idx)" |
|
190 | - value="<?= $enc->attr( key( $priceTypes ) ); ?>" /> |
|
189 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.type'))); ?>'.replace('idx', idx)" |
|
190 | + value="<?= $enc->attr(key($priceTypes)); ?>" /> |
|
191 | 191 | <?php endif; ?> |
192 | 192 | |
193 | 193 | <div class="form-group row mandatory"> |
194 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Minimum quantity' ) ); ?></label> |
|
194 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Minimum quantity')); ?></label> |
|
195 | 195 | <div class="col-sm-8"> |
196 | - <input class="form-control item-quantity" type="number" step="1" min="1" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
197 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.quantity' ) ) ); ?>'.replace('idx', idx)" |
|
198 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Minimum quantity' ) ); ?>" |
|
196 | + <input class="form-control item-quantity" type="number" step="1" min="1" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
197 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.quantity'))); ?>'.replace('idx', idx)" |
|
198 | + placeholder="<?= $enc->attr($this->translate('admin', 'Minimum quantity')); ?>" |
|
199 | 199 | v-bind:readonly="checkSite('price.siteid', idx)" |
200 | 200 | v-model="items[idx]['price.quantity']" /> |
201 | 201 | </div> |
202 | 202 | <div class="col-sm-12 form-text text-muted help-text"> |
203 | - <?= $enc->html( $this->translate( 'admin', 'Required quantity of articles for block pricing, e.g. one article for $5.00, ten articles for $45.00' ) ); ?> |
|
203 | + <?= $enc->html($this->translate('admin', 'Required quantity of articles for block pricing, e.g. one article for $5.00, ten articles for $45.00')); ?> |
|
204 | 204 | </div> |
205 | 205 | </div> |
206 | 206 | |
@@ -209,70 +209,70 @@ discard block |
||
209 | 209 | |
210 | 210 | <div v-on:click="toggle(idx)" class="col-xl-12 advanced" v-bind:class="{ 'collapsed': !advanced[idx] }"> |
211 | 211 | <div class="card-tools-left"> |
212 | - <div class="btn act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
213 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide advanced data') ); ?>"> |
|
212 | + <div class="btn act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
213 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide advanced data')); ?>"> |
|
214 | 214 | </div> |
215 | 215 | </div> |
216 | - <span class="header-label"><?= $enc->html( $this->translate( 'admin', 'Advanced' ) ); ?></span> |
|
216 | + <span class="header-label"><?= $enc->html($this->translate('admin', 'Advanced')); ?></span> |
|
217 | 217 | </div> |
218 | 218 | |
219 | 219 | <div v-show="advanced[idx]" class="col-xl-6 content-block secondary"> |
220 | 220 | |
221 | 221 | <input type="hidden" v-model="items[idx]['product.lists.type']" |
222 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.type' ) ) ); ?>'.replace( 'idx', idx )" /> |
|
222 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'product.lists.type'))); ?>'.replace( 'idx', idx )" /> |
|
223 | 223 | |
224 | - <?php $listTypes = $this->get( 'priceListTypes', [] ); ?> |
|
225 | - <?php if( count( $listTypes ) > 1 ) : ?> |
|
224 | + <?php $listTypes = $this->get('priceListTypes', []); ?> |
|
225 | + <?php if (count($listTypes) > 1) : ?> |
|
226 | 226 | <div class="form-group row mandatory"> |
227 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'List type' ) ); ?></label> |
|
227 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'List type')); ?></label> |
|
228 | 228 | <div class="col-sm-8"> |
229 | - <select class="form-control custom-select listitem-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
230 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
229 | + <select class="form-control custom-select listitem-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
230 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'product.lists.type'))); ?>'.replace('idx', idx)" |
|
231 | 231 | v-bind:readonly="checkSite('product.lists.siteid', idx)" |
232 | 232 | v-model="items[idx]['product.lists.type']" > |
233 | 233 | |
234 | - <?php foreach( $this->get( 'priceListTypes', [] ) as $typeItem ) : ?> |
|
235 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" v-bind:selected="entry['product.lists.type'] == '<?= $enc->attr( $typeItem->getCode() ) ?>'" > |
|
236 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
234 | + <?php foreach ($this->get('priceListTypes', []) as $typeItem) : ?> |
|
235 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" v-bind:selected="entry['product.lists.type'] == '<?= $enc->attr($typeItem->getCode()) ?>'" > |
|
236 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
237 | 237 | </option> |
238 | 238 | <?php endforeach; ?> |
239 | 239 | </select> |
240 | 240 | </div> |
241 | 241 | <div class="col-sm-12 form-text text-muted help-text"> |
242 | - <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
|
242 | + <?= $enc->html($this->translate('admin', 'Second level type for grouping items')); ?> |
|
243 | 243 | </div> |
244 | 244 | </div> |
245 | 245 | <?php else : ?> |
246 | 246 | <input class="listitem-type" type="hidden" |
247 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
248 | - value="<?= $enc->attr( key( $listTypes ) ); ?>" |
|
247 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'product.lists.type'))); ?>'.replace('idx', idx)" |
|
248 | + value="<?= $enc->attr(key($listTypes)); ?>" |
|
249 | 249 | v-model="items[idx]['product.lists.type']" /> |
250 | 250 | <?php endif; ?> |
251 | 251 | |
252 | 252 | <div class="form-group row optional"> |
253 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
253 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
254 | 254 | <div class="col-sm-8"> |
255 | - <input class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
256 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.datestart' ) ) ); ?>'.replace('idx', idx)" |
|
257 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
255 | + <input class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
256 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'product.lists.datestart'))); ?>'.replace('idx', idx)" |
|
257 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
258 | 258 | v-bind:readonly="checkSite('product.lists.siteid', idx)" |
259 | 259 | v-model="items[idx]['product.lists.datestart']" /> |
260 | 260 | </div> |
261 | 261 | <div class="col-sm-12 form-text text-muted help-text"> |
262 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site after that date and time' ) ); ?> |
|
262 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site after that date and time')); ?> |
|
263 | 263 | </div> |
264 | 264 | </div> |
265 | 265 | <div class="form-group row optional"> |
266 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
266 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
267 | 267 | <div class="col-sm-8"> |
268 | - <input class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
269 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.dateend' ) ) ); ?>'.replace('idx', idx)" |
|
270 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
268 | + <input class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
269 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'product.lists.dateend'))); ?>'.replace('idx', idx)" |
|
270 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
271 | 271 | v-bind:readonly="checkSite('product.lists.siteid', idx)" |
272 | 272 | v-model="items[idx]['product.lists.dateend']" /> |
273 | 273 | </div> |
274 | 274 | <div class="col-sm-12 form-text text-muted help-text"> |
275 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site until that date and time' ) ); ?> |
|
275 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site until that date and time')); ?> |
|
276 | 276 | </div> |
277 | 277 | </div> |
278 | 278 | </div> |
@@ -282,17 +282,17 @@ discard block |
||
282 | 282 | <thead> |
283 | 283 | <tr> |
284 | 284 | <th> |
285 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span> |
|
285 | + <span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span> |
|
286 | 286 | <div class="form-text text-muted help-text"> |
287 | - <?= $enc->html( $this->translate( 'admin', 'Configuration options, will be available as key/value pairs in the list item' ) ); ?> |
|
287 | + <?= $enc->html($this->translate('admin', 'Configuration options, will be available as key/value pairs in the list item')); ?> |
|
288 | 288 | </div> |
289 | 289 | </th> |
290 | 290 | <th> |
291 | - <?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?> |
|
291 | + <?= $enc->html($this->translate('admin', 'Value')); ?> |
|
292 | 292 | </th> |
293 | 293 | <th class="actions"> |
294 | - <div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
295 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
294 | + <div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
295 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
296 | 296 | v-bind:readonly="checkSite('product.lists.siteid', idx)" |
297 | 297 | v-on:click="addConfig(idx)" > |
298 | 298 | </div> |
@@ -305,21 +305,21 @@ discard block |
||
305 | 305 | <td> |
306 | 306 | <input is="auto-complete" |
307 | 307 | v-model="items[idx]['config']['key'][pos]" |
308 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'config', 'key', '' ) ) ); ?>'.replace('idx', idx)" |
|
308 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'config', 'key', ''))); ?>'.replace('idx', idx)" |
|
309 | 309 | v-bind:readonly="checkSite('product.lists.siteid', idx)" |
310 | - v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
310 | + v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
311 | 311 | v-bind:keys="[]" /> |
312 | 312 | </td> |
313 | 313 | <td> |
314 | - <input type="text" class="form-control" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
315 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'config', 'val', '' ) ) ); ?>'.replace('idx', idx)" |
|
314 | + <input type="text" class="form-control" tabindex="<?= $this->get('tabindex'); ?>" |
|
315 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'config', 'val', ''))); ?>'.replace('idx', idx)" |
|
316 | 316 | v-bind:readonly="checkSite('product.lists.siteid', idx)" |
317 | 317 | v-model="items[idx]['config']['val'][pos]" /> |
318 | 318 | </td> |
319 | 319 | <td class="actions"> |
320 | 320 | <div v-if="!checkSite('product.lists.siteid', idx)" v-on:click="removeConfig(idx, pos)" |
321 | - class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
322 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
321 | + class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
322 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
323 | 323 | </div> |
324 | 324 | </td> |
325 | 325 | </tr> |
@@ -328,14 +328,14 @@ discard block |
||
328 | 328 | </table> |
329 | 329 | </div> |
330 | 330 | |
331 | - <?= $this->get( 'priceBody' ); ?> |
|
331 | + <?= $this->get('priceBody'); ?> |
|
332 | 332 | |
333 | 333 | </div> |
334 | 334 | </div> |
335 | 335 | |
336 | 336 | <div class="card-tools-more"> |
337 | - <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
338 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
337 | + <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
338 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
339 | 339 | v-on:click="addItem('product.lists.')" > |
340 | 340 | </div> |
341 | 341 | </div> |
@@ -154,9 +154,12 @@ discard block |
||
154 | 154 | </select> |
155 | 155 | </div> |
156 | 156 | </div> |
157 | - <?php else : ?> |
|
157 | + <?php else { |
|
158 | + : ?> |
|
158 | 159 | <input class="item-currencyid" type="hidden" |
159 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); ?>'.replace('idx', idx)" |
|
160 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); |
|
161 | +} |
|
162 | +?>'.replace('idx', idx)" |
|
160 | 163 | value="<?= $enc->attr( key( $currencies ) ); ?>" /> |
161 | 164 | <?php endif; ?> |
162 | 165 | |
@@ -184,9 +187,12 @@ discard block |
||
184 | 187 | <?= $enc->html( $this->translate( 'admin', 'Types for additional prices like per one lb/kg or per month' ) ); ?> |
185 | 188 | </div> |
186 | 189 | </div> |
187 | - <?php else : ?> |
|
190 | + <?php else { |
|
191 | + : ?> |
|
188 | 192 | <input class="item-type" type="hidden" |
189 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); ?>'.replace('idx', idx)" |
|
193 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); |
|
194 | +} |
|
195 | +?>'.replace('idx', idx)" |
|
190 | 196 | value="<?= $enc->attr( key( $priceTypes ) ); ?>" /> |
191 | 197 | <?php endif; ?> |
192 | 198 | |
@@ -242,9 +248,12 @@ discard block |
||
242 | 248 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
243 | 249 | </div> |
244 | 250 | </div> |
245 | - <?php else : ?> |
|
251 | + <?php else { |
|
252 | + : ?> |
|
246 | 253 | <input class="listitem-type" type="hidden" |
247 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
254 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'product.lists.type' ) ) ); |
|
255 | +} |
|
256 | +?>'.replace('idx', idx)" |
|
248 | 257 | value="<?= $enc->attr( key( $listTypes ) ); ?>" |
249 | 258 | v-model="items[idx]['product.lists.type']" /> |
250 | 259 | <?php endif; ?> |
@@ -5,46 +5,46 @@ discard block |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017-2018 |
6 | 6 | */ |
7 | 7 | |
8 | -$attr = function( $list, $key, $code ) { |
|
9 | - $map = ( isset( $list[$key] ) ? $list[$key]->toArray() : [] ); |
|
10 | - return ( isset( $map[$code] ) ? $map[$code] : '' ); |
|
8 | +$attr = function($list, $key, $code) { |
|
9 | + $map = (isset($list[$key]) ? $list[$key]->toArray() : []); |
|
10 | + return (isset($map[$code]) ? $map[$code] : ''); |
|
11 | 11 | }; |
12 | 12 | |
13 | -$selected = function( $key, $code ) { |
|
14 | - return ( $key == $code ? 'selected="selected"' : '' ); |
|
13 | +$selected = function($key, $code) { |
|
14 | + return ($key == $code ? 'selected="selected"' : ''); |
|
15 | 15 | }; |
16 | 16 | |
17 | 17 | |
18 | -$target = $this->config( 'admin/jqadm/url/save/target' ); |
|
19 | -$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' ); |
|
20 | -$action = $this->config( 'admin/jqadm/url/save/action', 'save' ); |
|
21 | -$config = $this->config( 'admin/jqadm/url/save/config', [] ); |
|
18 | +$target = $this->config('admin/jqadm/url/save/target'); |
|
19 | +$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm'); |
|
20 | +$action = $this->config('admin/jqadm/url/save/action', 'save'); |
|
21 | +$config = $this->config('admin/jqadm/url/save/config', []); |
|
22 | 22 | |
23 | -$attributes = $this->get( 'itemAttributes', [] ); |
|
24 | -$params = $this->get( 'pageParams', [] ); |
|
23 | +$attributes = $this->get('itemAttributes', []); |
|
24 | +$params = $this->get('pageParams', []); |
|
25 | 25 | |
26 | 26 | $enc = $this->encoder(); |
27 | 27 | |
28 | 28 | |
29 | 29 | ?> |
30 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
30 | +<?php $this->block()->start('jqadm_content'); ?> |
|
31 | 31 | |
32 | 32 | <form class="item item-service form-horizontal" method="POST" enctype="multipart/form-data" |
33 | - action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>"> |
|
34 | - <input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'service.id' ) ) ); ?>" |
|
35 | - value="<?= $enc->attr( $this->get( 'itemData/service.id' ) ); ?>" /> |
|
36 | - <input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" /> |
|
33 | + action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>"> |
|
34 | + <input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'service.id'))); ?>" |
|
35 | + value="<?= $enc->attr($this->get('itemData/service.id')); ?>" /> |
|
36 | + <input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" /> |
|
37 | 37 | <?= $this->csrf()->formfield(); ?> |
38 | 38 | |
39 | 39 | <nav class="main-navbar"> |
40 | 40 | <span class="navbar-brand"> |
41 | - <?= $enc->html( $this->translate( 'admin', 'Service' ) ); ?>: |
|
42 | - <?= $enc->html( $this->get( 'itemData/service.id' ) ); ?> - |
|
43 | - <?= $enc->html( $this->get( 'itemData/service.label', $this->translate( 'admin', 'New' ) ) ); ?> |
|
44 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->match( $this->get( 'itemData/service.siteid' ) ) ); ?>)</span> |
|
41 | + <?= $enc->html($this->translate('admin', 'Service')); ?>: |
|
42 | + <?= $enc->html($this->get('itemData/service.id')); ?> - |
|
43 | + <?= $enc->html($this->get('itemData/service.label', $this->translate('admin', 'New'))); ?> |
|
44 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->match($this->get('itemData/service.siteid'))); ?>)</span> |
|
45 | 45 | </span> |
46 | 46 | <div class="item-actions"> |
47 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?> |
|
47 | + <?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?> |
|
48 | 48 | </div> |
49 | 49 | </nav> |
50 | 50 | |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | |
56 | 56 | <li class="nav-item basic"> |
57 | 57 | <a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic"> |
58 | - <?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?> |
|
58 | + <?= $enc->html($this->translate('admin', 'Basic')); ?> |
|
59 | 59 | </a> |
60 | 60 | </li> |
61 | 61 | |
62 | - <?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?> |
|
63 | - <li class="nav-item <?= $enc->attr( $subpart ); ?>"> |
|
64 | - <a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx+1; ?>"> |
|
65 | - <?= $enc->html( $this->translate( 'admin', $subpart ) ); ?> |
|
62 | + <?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?> |
|
63 | + <li class="nav-item <?= $enc->attr($subpart); ?>"> |
|
64 | + <a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>"> |
|
65 | + <?= $enc->html($this->translate('admin', $subpart)); ?> |
|
66 | 66 | </a> |
67 | 67 | </li> |
68 | 68 | <?php endforeach; ?> |
@@ -71,16 +71,16 @@ discard block |
||
71 | 71 | |
72 | 72 | <div class="item-meta text-muted"> |
73 | 73 | <small> |
74 | - <?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>: |
|
75 | - <span class="meta-value"><?= $enc->html( $this->get( 'itemData/service.mtime' ) ); ?></span> |
|
74 | + <?= $enc->html($this->translate('admin', 'Modified')); ?>: |
|
75 | + <span class="meta-value"><?= $enc->html($this->get('itemData/service.mtime')); ?></span> |
|
76 | 76 | </small> |
77 | 77 | <small> |
78 | - <?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>: |
|
79 | - <span class="meta-value"><?= $enc->html( $this->get( 'itemData/service.ctime' ) ); ?></span> |
|
78 | + <?= $enc->html($this->translate('admin', 'Created')); ?>: |
|
79 | + <span class="meta-value"><?= $enc->html($this->get('itemData/service.ctime')); ?></span> |
|
80 | 80 | </small> |
81 | 81 | <small> |
82 | - <?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>: |
|
83 | - <span class="meta-value"><?= $enc->html( $this->get( 'itemData/service.editor' ) ); ?></span> |
|
82 | + <?= $enc->html($this->translate('admin', 'Editor')); ?>: |
|
83 | + <span class="meta-value"><?= $enc->html($this->get('itemData/service.editor')); ?></span> |
|
84 | 84 | </small> |
85 | 85 | </div> |
86 | 86 | </div> |
@@ -89,156 +89,156 @@ discard block |
||
89 | 89 | |
90 | 90 | <div id="basic" class="row item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic"> |
91 | 91 | |
92 | - <div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?>"> |
|
92 | + <div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?>"> |
|
93 | 93 | <div class="form-group row mandatory"> |
94 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
94 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
95 | 95 | <div class="col-sm-8"> |
96 | 96 | <select class="form-control custom-select item-status" required="required" tabindex="1" |
97 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'service.status' ) ) ); ?>" |
|
98 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> > |
|
97 | + name="<?= $enc->attr($this->formparam(array('item', 'service.status'))); ?>" |
|
98 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> > |
|
99 | 99 | <option value=""> |
100 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
100 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
101 | 101 | </option> |
102 | - <option value="1" <?= $selected( $this->get( 'itemData/service.status', 1 ), 1 ); ?> > |
|
103 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
102 | + <option value="1" <?= $selected($this->get('itemData/service.status', 1), 1); ?> > |
|
103 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
104 | 104 | </option> |
105 | - <option value="0" <?= $selected( $this->get( 'itemData/service.status', 1 ), 0 ); ?> > |
|
106 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
105 | + <option value="0" <?= $selected($this->get('itemData/service.status', 1), 0); ?> > |
|
106 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
107 | 107 | </option> |
108 | - <option value="-1" <?= $selected( $this->get( 'itemData/service.status', 1 ), -1 ); ?> > |
|
109 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
108 | + <option value="-1" <?= $selected($this->get('itemData/service.status', 1), -1); ?> > |
|
109 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
110 | 110 | </option> |
111 | - <option value="-2" <?= $selected( $this->get( 'itemData/service.status', 1 ), -2 ); ?> > |
|
112 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
111 | + <option value="-2" <?= $selected($this->get('itemData/service.status', 1), -2); ?> > |
|
112 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
113 | 113 | </option> |
114 | 114 | </select> |
115 | 115 | </div> |
116 | 116 | </div> |
117 | 117 | <div class="form-group row mandatory"> |
118 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Type' ) ); ?></label> |
|
118 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Type')); ?></label> |
|
119 | 119 | <div class="col-sm-8"> |
120 | 120 | <select class="form-control custom-select item-type" required="required" tabindex="1" |
121 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'service.type' ) ) ); ?>" |
|
122 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> > |
|
121 | + name="<?= $enc->attr($this->formparam(array('item', 'service.type'))); ?>" |
|
122 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> > |
|
123 | 123 | <option value=""> |
124 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
124 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
125 | 125 | </option> |
126 | 126 | |
127 | - <?php foreach( $this->get( 'itemTypes', [] ) as $typeItem ) : ?> |
|
128 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" <?= $selected( $this->get( 'itemData/service.type' ), $typeItem->getCode() ); ?> > |
|
129 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
127 | + <?php foreach ($this->get('itemTypes', []) as $typeItem) : ?> |
|
128 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" <?= $selected($this->get('itemData/service.type'), $typeItem->getCode()); ?> > |
|
129 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
130 | 130 | </option> |
131 | 131 | <?php endforeach; ?> |
132 | 132 | </select> |
133 | 133 | </div> |
134 | 134 | </div> |
135 | 135 | <div class="form-group row mandatory"> |
136 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Code' ) ); ?></label> |
|
136 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Code')); ?></label> |
|
137 | 137 | <div class="col-sm-8"> |
138 | 138 | <input class="form-control item-code" type="text" required="required" tabindex="1" |
139 | - name="<?= $this->formparam( array( 'item', 'service.code' ) ); ?>" |
|
140 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Unique service code (required)' ) ); ?>" |
|
141 | - value="<?= $enc->attr( $this->get( 'itemData/service.code' ) ); ?>" |
|
142 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
139 | + name="<?= $this->formparam(array('item', 'service.code')); ?>" |
|
140 | + placeholder="<?= $enc->attr($this->translate('admin', 'Unique service code (required)')); ?>" |
|
141 | + value="<?= $enc->attr($this->get('itemData/service.code')); ?>" |
|
142 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
143 | 143 | </div> |
144 | 144 | <div class="col-sm-12 form-text text-muted help-text"> |
145 | - <?= $enc->html( $this->translate( 'admin', 'Unique code to identify the service, usually self-invented' ) ); ?> |
|
145 | + <?= $enc->html($this->translate('admin', 'Unique code to identify the service, usually self-invented')); ?> |
|
146 | 146 | </div> |
147 | 147 | </div> |
148 | 148 | <div class="form-group row mandatory"> |
149 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label> |
|
149 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label> |
|
150 | 150 | <div class="col-sm-8"> |
151 | 151 | <input class="form-control item-label" type="text" required="required" tabindex="1" |
152 | - name="<?= $this->formparam( array( 'item', 'service.label' ) ); ?>" |
|
153 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Internal name (required)' ) ); ?>" |
|
154 | - value="<?= $enc->attr( $this->get( 'itemData/service.label' ) ); ?>" |
|
155 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
152 | + name="<?= $this->formparam(array('item', 'service.label')); ?>" |
|
153 | + placeholder="<?= $enc->attr($this->translate('admin', 'Internal name (required)')); ?>" |
|
154 | + value="<?= $enc->attr($this->get('itemData/service.label')); ?>" |
|
155 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
156 | 156 | </div> |
157 | 157 | <div class="col-sm-12 form-text text-muted help-text"> |
158 | - <?= $enc->html( $this->translate( 'admin', 'Internal article name, will be used on the web site if no product name for the language is available' ) ); ?> |
|
158 | + <?= $enc->html($this->translate('admin', 'Internal article name, will be used on the web site if no product name for the language is available')); ?> |
|
159 | 159 | </div> |
160 | 160 | </div> |
161 | 161 | <div class="form-group row mandatory"> |
162 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Provider' ) ); ?></label> |
|
162 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Provider')); ?></label> |
|
163 | 163 | <div class="col-sm-8 input-group"> |
164 | 164 | <input class="form-control item-provider combobox" type="text" required="required" tabindex="1" pattern="[A-Za-z0-9]+(,[A-Za-z0-9]+)*" |
165 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'service.provider' ) ) ); ?>" |
|
166 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Provider/decorator class names (required)' ) ); ?>" |
|
167 | - value="<?= $enc->attr( $this->get( 'itemData/service.provider' ) ); ?>" |
|
168 | - data-delivery="<?= implode( ',', $this->get( 'itemProviders/delivery', [] ) ); ?>" |
|
169 | - data-payment="<?= implode( ',', $this->get( 'itemProviders/payment', [] ) ); ?>" |
|
170 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
165 | + name="<?= $enc->attr($this->formparam(array('item', 'service.provider'))); ?>" |
|
166 | + placeholder="<?= $enc->attr($this->translate('admin', 'Provider/decorator class names (required)')); ?>" |
|
167 | + value="<?= $enc->attr($this->get('itemData/service.provider')); ?>" |
|
168 | + data-delivery="<?= implode(',', $this->get('itemProviders/delivery', [])); ?>" |
|
169 | + data-payment="<?= implode(',', $this->get('itemProviders/payment', [])); ?>" |
|
170 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
171 | 171 | <div class="dropdown input-group-append"> |
172 | 172 | <button class="btn btn-secondary" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+</button> |
173 | 173 | <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="decoratorButton"> |
174 | - <?php foreach( $this->get( 'itemDecorators', [] ) as $name ) : ?> |
|
175 | - <li class="dropdown-item"><a class="decorator-name" href="#" data-name="<?= $enc->attr( $name ); ?>"><?= $enc->html( $name ); ?></a></li> |
|
174 | + <?php foreach ($this->get('itemDecorators', []) as $name) : ?> |
|
175 | + <li class="dropdown-item"><a class="decorator-name" href="#" data-name="<?= $enc->attr($name); ?>"><?= $enc->html($name); ?></a></li> |
|
176 | 176 | <?php endforeach; ?> |
177 | 177 | </ul> |
178 | 178 | </div> |
179 | 179 | </div> |
180 | 180 | <div class="col-sm-12 form-text text-muted help-text"> |
181 | - <?= $enc->html( $this->translate( 'admin', 'One provider and zero or more decorator class names separated by commas' ) ); ?> |
|
181 | + <?= $enc->html($this->translate('admin', 'One provider and zero or more decorator class names separated by commas')); ?> |
|
182 | 182 | </div> |
183 | 183 | </div> |
184 | 184 | <div class="form-group row mandatory"> |
185 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Position' ) ); ?></label> |
|
185 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Position')); ?></label> |
|
186 | 186 | <div class="col-sm-8"> |
187 | 187 | <input class="form-control item-position" type="number" required="required" tabindex="1" |
188 | - name="<?= $this->formparam( array( 'item', 'service.position' ) ); ?>" |
|
189 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Service position (required)' ) ); ?>" |
|
190 | - value="<?= $enc->attr( $this->get( 'itemData/service.position' ) ); ?>" |
|
191 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
188 | + name="<?= $this->formparam(array('item', 'service.position')); ?>" |
|
189 | + placeholder="<?= $enc->attr($this->translate('admin', 'Service position (required)')); ?>" |
|
190 | + value="<?= $enc->attr($this->get('itemData/service.position')); ?>" |
|
191 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
192 | 192 | </div> |
193 | 193 | <div class="col-sm-12 form-text text-muted help-text"> |
194 | - <?= $enc->html( $this->translate( 'admin', 'Order of the service options in the checkout process' ) ); ?> |
|
194 | + <?= $enc->html($this->translate('admin', 'Order of the service options in the checkout process')); ?> |
|
195 | 195 | </div> |
196 | 196 | </div> |
197 | 197 | <div class="form-group row optional"> |
198 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
198 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
199 | 199 | <div class="col-sm-8"> |
200 | 200 | <input class="form-control item-datestart" type="datetime-local" tabindex="1" |
201 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'service.datestart' ) ) ); ?>" |
|
202 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
203 | - value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'itemData/service.datestart' ) ) ); ?>" |
|
204 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
201 | + name="<?= $enc->attr($this->formparam(array('item', 'service.datestart'))); ?>" |
|
202 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
203 | + value="<?= $enc->attr(str_replace(' ', 'T', $this->get('itemData/service.datestart'))); ?>" |
|
204 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
205 | 205 | </div> |
206 | 206 | <div class="col-sm-12 form-text text-muted help-text"> |
207 | - <?= $enc->html( $this->translate( 'admin', 'The option is only shown on the web site after that date and time' ) ); ?> |
|
207 | + <?= $enc->html($this->translate('admin', 'The option is only shown on the web site after that date and time')); ?> |
|
208 | 208 | </div> |
209 | 209 | </div> |
210 | 210 | <div class="form-group row optional"> |
211 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
211 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
212 | 212 | <div class="col-sm-8"> |
213 | 213 | <input class="form-control item-dateend" type="datetime-local" tabindex="1" |
214 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'service.dateend' ) ) ); ?>" |
|
215 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
216 | - value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'itemData/service.dateend' ) ) ); ?>" |
|
217 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
214 | + name="<?= $enc->attr($this->formparam(array('item', 'service.dateend'))); ?>" |
|
215 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
216 | + value="<?= $enc->attr(str_replace(' ', 'T', $this->get('itemData/service.dateend'))); ?>" |
|
217 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
218 | 218 | </div> |
219 | 219 | <div class="col-sm-12 form-text text-muted help-text"> |
220 | - <?= $enc->html( $this->translate( 'admin', 'The option is only shown on the web site until that date and time' ) ); ?> |
|
220 | + <?= $enc->html($this->translate('admin', 'The option is only shown on the web site until that date and time')); ?> |
|
221 | 221 | </div> |
222 | 222 | </div> |
223 | 223 | </div><!-- |
224 | 224 | |
225 | - --><div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?>"> |
|
225 | + --><div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?>"> |
|
226 | 226 | <table class="item-config table table-striped"> |
227 | 227 | <thead> |
228 | 228 | <tr> |
229 | 229 | <th class="config-row-key"> |
230 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span> |
|
230 | + <span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span> |
|
231 | 231 | <div class="form-text text-muted help-text"> |
232 | - <?= $enc->html( $this->translate( 'admin', 'Service provider or service decorator configuration name' ) ); ?> |
|
232 | + <?= $enc->html($this->translate('admin', 'Service provider or service decorator configuration name')); ?> |
|
233 | 233 | </div> |
234 | 234 | </th> |
235 | 235 | <th class="config-row-value"> |
236 | - <?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?> |
|
236 | + <?= $enc->html($this->translate('admin', 'Value')); ?> |
|
237 | 237 | </th> |
238 | 238 | <th class="actions"> |
239 | - <?php if( !$this->site()->readonly( $this->get( 'itemData/service.siteid' ) ) ) : ?> |
|
239 | + <?php if (!$this->site()->readonly($this->get('itemData/service.siteid'))) : ?> |
|
240 | 240 | <div class="btn act-add fa" tabindex="1" |
241 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"> |
|
241 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"> |
|
242 | 242 | </div> |
243 | 243 | <?php endif; ?> |
244 | 244 | </th> |
@@ -246,26 +246,26 @@ discard block |
||
246 | 246 | </thead> |
247 | 247 | <tbody> |
248 | 248 | |
249 | - <?php foreach( (array) $this->get( 'itemData/config/key', [] ) as $idx => $key ) : ?> |
|
249 | + <?php foreach ((array) $this->get('itemData/config/key', []) as $idx => $key) : ?> |
|
250 | 250 | <tr class="config-item"> |
251 | 251 | <td class="config-row-key"> |
252 | 252 | <input type="text" class="config-key form-control" tabindex="1" |
253 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'key', '' ) ) ); ?>" |
|
254 | - value="<?= $enc->attr( $this->get( 'itemData/config/key/' . $idx, $key ) ); ?>" |
|
255 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
253 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'key', ''))); ?>" |
|
254 | + value="<?= $enc->attr($this->get('itemData/config/key/' . $idx, $key)); ?>" |
|
255 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
256 | 256 | <div class="form-text text-muted help-text"></div> |
257 | 257 | </td> |
258 | 258 | <td class="config-row-value"> |
259 | - <?php $cfgval = $this->get( 'itemData/config/val/' . $idx ); ?> |
|
259 | + <?php $cfgval = $this->get('itemData/config/val/' . $idx); ?> |
|
260 | 260 | <input type="text" class="config-value form-control config-type" tabindex="1" |
261 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" |
|
262 | - value="<?= $enc->attr( !is_scalar( $cfgval ) ? json_encode( $cfgval ) : $cfgval ); ?>" |
|
263 | - <?= $this->site()->readonly( $this->get( 'itemData/service.siteid' ) ); ?> /> |
|
261 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" |
|
262 | + value="<?= $enc->attr(!is_scalar($cfgval) ? json_encode($cfgval) : $cfgval); ?>" |
|
263 | + <?= $this->site()->readonly($this->get('itemData/service.siteid')); ?> /> |
|
264 | 264 | </td> |
265 | 265 | <td class="actions"> |
266 | - <?php if( !$this->site()->readonly( $this->get( 'itemData/service.siteid' ) ) ) : ?> |
|
266 | + <?php if (!$this->site()->readonly($this->get('itemData/service.siteid'))) : ?> |
|
267 | 267 | <div class="btn act-delete fa" tabindex="1" |
268 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
268 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
269 | 269 | </div> |
270 | 270 | <?php endif; ?> |
271 | 271 | </td> |
@@ -275,20 +275,20 @@ discard block |
||
275 | 275 | <tr class="config-item prototype"> |
276 | 276 | <td class="config-row-key"> |
277 | 277 | <input type="text" class="config-key form-control" tabindex="1" disabled="disabled" |
278 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'key', '' ) ) ); ?>" /> |
|
278 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'key', ''))); ?>" /> |
|
279 | 279 | <div class="form-text text-muted help-text"></div> |
280 | 280 | </td> |
281 | 281 | <td class="config-row-value"> |
282 | 282 | |
283 | 283 | <div class="config-type config-type-map"> |
284 | 284 | <input type="text" class="config-value form-control" tabindex="1" disabled="disabled" |
285 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" /> |
|
285 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" /> |
|
286 | 286 | |
287 | 287 | <table class="table table-striped config-map-table"> |
288 | 288 | <tr class="config-map-row prototype-map"> |
289 | 289 | <td class="config-map-actions"> |
290 | 290 | <div class="btn act-delete fa" tabindex="1" |
291 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
291 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
292 | 292 | </div> |
293 | 293 | </td> |
294 | 294 | <td class="config-map-row-key"> |
@@ -301,12 +301,12 @@ discard block |
||
301 | 301 | <tr class="config-map-actions"> |
302 | 302 | <td class="config-map-action-add"> |
303 | 303 | <div class="btn act-add fa" tabindex="1" |
304 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry') ); ?>"> |
|
304 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry')); ?>"> |
|
305 | 305 | </div> |
306 | 306 | </td> |
307 | 307 | <td class="config-map-action-update" colspan="2"> |
308 | 308 | <div class="btn btn-primary act-update" tabindex="1"> |
309 | - <?= $enc->attr( $this->translate( 'admin', 'OK') ); ?> |
|
309 | + <?= $enc->attr($this->translate('admin', 'OK')); ?> |
|
310 | 310 | </div> |
311 | 311 | </td> |
312 | 312 | </tr> |
@@ -314,37 +314,37 @@ discard block |
||
314 | 314 | </div> |
315 | 315 | |
316 | 316 | <select class="config-value form-control config-type config-type-select" tabindex="1" disabled="disabled" |
317 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" > |
|
317 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" > |
|
318 | 318 | </select> |
319 | 319 | |
320 | 320 | <select class="config-value form-control config-type config-type-boolean" tabindex="1" disabled="disabled" |
321 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" > |
|
321 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" > |
|
322 | 322 | <option value=""></option> |
323 | - <option value="0"><?= $enc->html( $this->translate( 'client', 'no' ) ); ?></option> |
|
324 | - <option value="1"><?= $enc->html( $this->translate( 'client', 'yes' ) ); ?></option> |
|
323 | + <option value="0"><?= $enc->html($this->translate('client', 'no')); ?></option> |
|
324 | + <option value="1"><?= $enc->html($this->translate('client', 'yes')); ?></option> |
|
325 | 325 | </select> |
326 | 326 | |
327 | 327 | <input type="text" class="config-value form-control config-type config-type-string" tabindex="1" disabled="disabled" |
328 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" /> |
|
328 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" /> |
|
329 | 329 | |
330 | 330 | <input type="number" class="config-value form-control config-type config-type-number" tabindex="1" disabled="disabled" |
331 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" step="0.01" /> |
|
331 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" step="0.01" /> |
|
332 | 332 | |
333 | 333 | <input type="number" class="config-value form-control config-type config-type-integer" tabindex="1" disabled="disabled" |
334 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" /> |
|
334 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" /> |
|
335 | 335 | |
336 | 336 | <input type="date" class="config-value form-control config-type config-type-date" tabindex="1" disabled="disabled" |
337 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" /> |
|
337 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" /> |
|
338 | 338 | |
339 | 339 | <input type="datetime-local" class="config-value form-control config-type config-type-datetime" tabindex="1" disabled="disabled" |
340 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" /> |
|
340 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" /> |
|
341 | 341 | |
342 | 342 | <input type="time" class="config-value form-control config-type config-type-time" tabindex="1" disabled="disabled" |
343 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" /> |
|
343 | + name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" /> |
|
344 | 344 | </td> |
345 | 345 | <td class="actions"> |
346 | 346 | <div class="btn act-delete fa" tabindex="1" |
347 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
347 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
348 | 348 | </div> |
349 | 349 | </td> |
350 | 350 | </tr> |
@@ -354,12 +354,12 @@ discard block |
||
354 | 354 | |
355 | 355 | </div> |
356 | 356 | |
357 | - <?= $this->get( 'itemBody' ); ?> |
|
357 | + <?= $this->get('itemBody'); ?> |
|
358 | 358 | |
359 | 359 | </div> |
360 | 360 | |
361 | 361 | <div class="item-actions"> |
362 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?> |
|
362 | + <?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?> |
|
363 | 363 | </div> |
364 | 364 | </div> |
365 | 365 | </form> |
@@ -367,4 +367,4 @@ discard block |
||
367 | 367 | <?php $this->block()->stop(); ?> |
368 | 368 | |
369 | 369 | |
370 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?> |
|
370 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?> |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | ?> |
18 | 18 | <div id="text" class="item-text content-block tab-pane fade" role="tablist" aria-labelledby="text"> |
19 | 19 | <div id="item-text-group" role="tablist" aria-multiselectable="true" |
20 | - data-items="<?= $enc->attr( json_encode( $this->get( 'textData', [] ) ) ); ?>" |
|
21 | - data-listtype="<?= key( $this->get( 'textListTypes', [] ) ) ?>" |
|
22 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
20 | + data-items="<?= $enc->attr(json_encode($this->get('textData', []))); ?>" |
|
21 | + data-listtype="<?= key($this->get('textListTypes', [])) ?>" |
|
22 | + data-keys="<?= $enc->attr(json_encode($keys)) ?>" |
|
23 | 23 | data-siteid="<?= $this->site()->siteid() ?>" > |
24 | 24 | |
25 | 25 | <div v-for="(entry, idx) in items" class="group-item card"> |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | v-bind:data-target="'#item-text-group-data-' + idx" data-toggle="collapse" role="tab" class="card-header header" |
29 | 29 | v-bind:aria-controls="'item-text-group-data-' + idx" aria-expanded="false"> |
30 | 30 | <div class="card-tools-left"> |
31 | - <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
32 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry') ); ?>"> |
|
31 | + <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
32 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>"> |
|
33 | 33 | </div> |
34 | 34 | </div> |
35 | 35 | <span class="item-label header-label" v-html="getLabel(idx)"></span> |
36 | 36 | |
37 | 37 | <div class="card-tools-right"> |
38 | 38 | <div v-if="!checkSite('service.lists.siteid', idx)" |
39 | - class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
40 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
39 | + class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
40 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
41 | 41 | v-on:click.stop="removeItem(idx)"> |
42 | 42 | </div> |
43 | 43 | </div> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | v-bind:aria-labelledby="'item-text-group-item-' + idx" role="tabpanel" class="card-block collapse row"> |
48 | 48 | |
49 | 49 | <input type="hidden" v-model="items[idx]['text.id']" |
50 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.id' ) ) ); ?>'.replace('idx', idx)" /> |
|
50 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.id'))); ?>'.replace('idx', idx)" /> |
|
51 | 51 | |
52 | 52 | <div class="col-xl-6"> |
53 | 53 | |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | <textarea is="html-editor" class="form-control item-content" required="required" v-once |
57 | 57 | v-model="items[idx]['text.content']" |
58 | 58 | v-bind:value="items[idx]['text.content']" |
59 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.content' ) ) ); ?>'.replace('idx', idx)" |
|
59 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.content'))); ?>'.replace('idx', idx)" |
|
60 | 60 | v-bind:readonly="checkSite('text.siteid', idx)" |
61 | - v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
61 | + v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
62 | 62 | ></textarea> |
63 | 63 | </div> |
64 | 64 | </div> |
@@ -68,101 +68,101 @@ discard block |
||
68 | 68 | <div class="col-xl-6"> |
69 | 69 | |
70 | 70 | <div class="form-group row mandatory"> |
71 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
71 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
72 | 72 | <div class="col-sm-8"> |
73 | - <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
74 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.status' ) ) ); ?>'.replace('idx', idx)" |
|
73 | + <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
74 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.status'))); ?>'.replace('idx', idx)" |
|
75 | 75 | v-bind:readonly="checkSite('text.siteid', idx)" |
76 | 76 | v-model="items[idx]['text.status']" > |
77 | 77 | <option value="1" v-bind:selected="entry['text.status'] == 1" > |
78 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
78 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
79 | 79 | </option> |
80 | 80 | <option value="0" v-bind:selected="entry['text.status'] == 0" > |
81 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
81 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
82 | 82 | </option> |
83 | 83 | <option value="-1" v-bind:selected="entry['text.status'] == -1" > |
84 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
84 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
85 | 85 | </option> |
86 | 86 | <option value="-2" v-bind:selected="entry['text.status'] == -2" > |
87 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
87 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
88 | 88 | </option> |
89 | 89 | </select> |
90 | 90 | </div> |
91 | 91 | </div> |
92 | 92 | |
93 | - <?php $languages = $this->get( 'pageLangItems', [] ); ?> |
|
94 | - <?php if( count( $languages ) > 1 ) : ?> |
|
93 | + <?php $languages = $this->get('pageLangItems', []); ?> |
|
94 | + <?php if (count($languages) > 1) : ?> |
|
95 | 95 | <div class="form-group row mandatory"> |
96 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></label> |
|
96 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Language')); ?></label> |
|
97 | 97 | <div class="col-sm-8"> |
98 | - <select class="form-control custom-select item-languageid" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
99 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
98 | + <select class="form-control custom-select item-languageid" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
99 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.languageid'))); ?>'.replace('idx', idx)" |
|
100 | 100 | v-bind:readonly="checkSite('text.siteid', idx)" |
101 | 101 | v-model="items[idx]['text.languageid']" > |
102 | 102 | |
103 | 103 | <option value="" disable > |
104 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
104 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
105 | 105 | </option> |
106 | 106 | |
107 | - <?php foreach( $languages as $langId => $langItem ) : ?> |
|
108 | - <option value="<?= $enc->attr( $langId ); ?>" v-bind:selected="entry['text.languageid'] == '<?= $enc->attr( $langId ) ?>'" > |
|
109 | - <?= $enc->html( $langItem->getLabel() ); ?> |
|
107 | + <?php foreach ($languages as $langId => $langItem) : ?> |
|
108 | + <option value="<?= $enc->attr($langId); ?>" v-bind:selected="entry['text.languageid'] == '<?= $enc->attr($langId) ?>'" > |
|
109 | + <?= $enc->html($langItem->getLabel()); ?> |
|
110 | 110 | </option> |
111 | 111 | <?php endforeach; ?> |
112 | 112 | </select> |
113 | 113 | </div> |
114 | 114 | <div class="col-sm-12 form-text text-muted help-text"> |
115 | - <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
|
115 | + <?= $enc->html($this->translate('admin', 'Language of the entered text')); ?> |
|
116 | 116 | </div> |
117 | 117 | </div> |
118 | 118 | <?php else : ?> |
119 | 119 | <input class="text-langid" type="hidden" |
120 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
121 | - value="<?= $enc->attr( key( $languages ) ); ?>" /> |
|
120 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.languageid'))); ?>'.replace('idx', idx)" |
|
121 | + value="<?= $enc->attr(key($languages)); ?>" /> |
|
122 | 122 | <?php endif; ?> |
123 | 123 | |
124 | - <?php $textTypes = $this->get( 'textTypes', [] ); ?> |
|
125 | - <?php if( count( $textTypes ) > 1 ) : ?> |
|
124 | + <?php $textTypes = $this->get('textTypes', []); ?> |
|
125 | + <?php if (count($textTypes) > 1) : ?> |
|
126 | 126 | <div class="form-group row mandatory"> |
127 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Type' ) ); ?></label> |
|
127 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Type')); ?></label> |
|
128 | 128 | <div class="col-sm-8"> |
129 | - <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
130 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.type' ) ) ); ?>'.replace('idx', idx)" |
|
129 | + <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
130 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.type'))); ?>'.replace('idx', idx)" |
|
131 | 131 | v-bind:readonly="checkSite('text.siteid', idx)" |
132 | 132 | v-model="items[idx]['text.type']" > |
133 | 133 | |
134 | 134 | <option value="" disable > |
135 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
135 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
136 | 136 | </option> |
137 | 137 | |
138 | - <?php foreach( (array) $textTypes as $typeItem ) : ?> |
|
139 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" v-bind:selected="entry['text.type'] == '<?= $enc->attr( $typeItem->getCode() ) ?>'" > |
|
140 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
138 | + <?php foreach ((array) $textTypes as $typeItem) : ?> |
|
139 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" v-bind:selected="entry['text.type'] == '<?= $enc->attr($typeItem->getCode()) ?>'" > |
|
140 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
141 | 141 | </option> |
142 | 142 | <?php endforeach; ?> |
143 | 143 | </select> |
144 | 144 | </div> |
145 | 145 | <div class="col-sm-12 form-text text-muted help-text"> |
146 | - <?= $enc->html( $this->translate( 'admin', 'Types for additional texts like per one lb/kg or per month' ) ); ?> |
|
146 | + <?= $enc->html($this->translate('admin', 'Types for additional texts like per one lb/kg or per month')); ?> |
|
147 | 147 | </div> |
148 | 148 | </div> |
149 | 149 | <?php else : ?> |
150 | 150 | <input class="item-type" type="hidden" |
151 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.type' ) ) ); ?>'.replace('idx', idx)" |
|
152 | - value="<?= $enc->attr( key( $textTypes ) ); ?>" /> |
|
151 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.type'))); ?>'.replace('idx', idx)" |
|
152 | + value="<?= $enc->attr(key($textTypes)); ?>" /> |
|
153 | 153 | <?php endif; ?> |
154 | 154 | |
155 | 155 | <div class="form-group row optional"> |
156 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label> |
|
156 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label> |
|
157 | 157 | <div class="col-sm-8"> |
158 | - <input class="form-control item-label" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
159 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.label' ) ) ); ?>'.replace('idx', idx)" |
|
160 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Label' ) ); ?>" |
|
158 | + <input class="form-control item-label" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
159 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'text.label'))); ?>'.replace('idx', idx)" |
|
160 | + placeholder="<?= $enc->attr($this->translate('admin', 'Label')); ?>" |
|
161 | 161 | v-bind:readonly="checkSite('text.siteid', idx)" |
162 | 162 | v-model="items[idx]['text.label']" /> |
163 | 163 | </div> |
164 | 164 | <div class="col-sm-12 form-text text-muted help-text"> |
165 | - <?= $enc->html( $this->translate( 'admin', 'Description of the text content if it\'s in a foreign language' ) ); ?> |
|
165 | + <?= $enc->html($this->translate('admin', 'Description of the text content if it\'s in a foreign language')); ?> |
|
166 | 166 | </div> |
167 | 167 | </div> |
168 | 168 | |
@@ -171,70 +171,70 @@ discard block |
||
171 | 171 | |
172 | 172 | <div v-on:click="toggle(idx)" class="col-xl-12 advanced" v-bind:class="{ 'collapsed': !advanced[idx] }"> |
173 | 173 | <div class="card-tools-left"> |
174 | - <div class="btn act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
175 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide advanced data') ); ?>"> |
|
174 | + <div class="btn act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
175 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide advanced data')); ?>"> |
|
176 | 176 | </div> |
177 | 177 | </div> |
178 | - <span class="header-label"><?= $enc->html( $this->translate( 'admin', 'Advanced' ) ); ?></span> |
|
178 | + <span class="header-label"><?= $enc->html($this->translate('admin', 'Advanced')); ?></span> |
|
179 | 179 | </div> |
180 | 180 | |
181 | 181 | <div v-show="advanced[idx]" class="col-xl-6 content-block secondary"> |
182 | 182 | |
183 | 183 | <input type="hidden" v-model="items[idx]['service.lists.type']" |
184 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.type' ) ) ); ?>'.replace( 'idx', idx )" /> |
|
184 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'service.lists.type'))); ?>'.replace( 'idx', idx )" /> |
|
185 | 185 | |
186 | - <?php $listTypes = $this->get( 'textListTypes', [] ); ?> |
|
187 | - <?php if( count( $listTypes ) > 1 ) : ?> |
|
186 | + <?php $listTypes = $this->get('textListTypes', []); ?> |
|
187 | + <?php if (count($listTypes) > 1) : ?> |
|
188 | 188 | <div class="form-group row mandatory"> |
189 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'List type' ) ); ?></label> |
|
189 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'List type')); ?></label> |
|
190 | 190 | <div class="col-sm-8"> |
191 | - <select class="form-control custom-select listitem-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
192 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
191 | + <select class="form-control custom-select listitem-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
192 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'service.lists.type'))); ?>'.replace('idx', idx)" |
|
193 | 193 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
194 | 194 | v-model="items[idx]['service.lists.type']" > |
195 | 195 | |
196 | - <?php foreach( $this->get( 'textListTypes', [] ) as $typeItem ) : ?> |
|
197 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" v-bind:selected="entry['service.lists.type'] == '<?= $enc->attr( $typeItem->getCode() ) ?>'" > |
|
198 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
196 | + <?php foreach ($this->get('textListTypes', []) as $typeItem) : ?> |
|
197 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" v-bind:selected="entry['service.lists.type'] == '<?= $enc->attr($typeItem->getCode()) ?>'" > |
|
198 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
199 | 199 | </option> |
200 | 200 | <?php endforeach; ?> |
201 | 201 | </select> |
202 | 202 | </div> |
203 | 203 | <div class="col-sm-12 form-text text-muted help-text"> |
204 | - <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
|
204 | + <?= $enc->html($this->translate('admin', 'Second level type for grouping items')); ?> |
|
205 | 205 | </div> |
206 | 206 | </div> |
207 | 207 | <?php else : ?> |
208 | 208 | <input class="listitem-type" type="hidden" |
209 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
210 | - value="<?= $enc->attr( key( $listTypes ) ); ?>" |
|
209 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'service.lists.type'))); ?>'.replace('idx', idx)" |
|
210 | + value="<?= $enc->attr(key($listTypes)); ?>" |
|
211 | 211 | v-model="items[idx]['service.lists.type']" /> |
212 | 212 | <?php endif; ?> |
213 | 213 | |
214 | 214 | <div class="form-group row optional"> |
215 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
215 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
216 | 216 | <div class="col-sm-8"> |
217 | - <input class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
218 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.datestart' ) ) ); ?>'.replace('idx', idx)" |
|
219 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
217 | + <input class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
218 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'service.lists.datestart'))); ?>'.replace('idx', idx)" |
|
219 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
220 | 220 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
221 | 221 | v-model="items[idx]['service.lists.datestart']" /> |
222 | 222 | </div> |
223 | 223 | <div class="col-sm-12 form-text text-muted help-text"> |
224 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site after that date and time' ) ); ?> |
|
224 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site after that date and time')); ?> |
|
225 | 225 | </div> |
226 | 226 | </div> |
227 | 227 | <div class="form-group row optional"> |
228 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
228 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
229 | 229 | <div class="col-sm-8"> |
230 | - <input class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
231 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.dateend' ) ) ); ?>'.replace('idx', idx)" |
|
232 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
230 | + <input class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
231 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'service.lists.dateend'))); ?>'.replace('idx', idx)" |
|
232 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
233 | 233 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
234 | 234 | v-model="items[idx]['service.lists.dateend']" /> |
235 | 235 | </div> |
236 | 236 | <div class="col-sm-12 form-text text-muted help-text"> |
237 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site until that date and time' ) ); ?> |
|
237 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site until that date and time')); ?> |
|
238 | 238 | </div> |
239 | 239 | </div> |
240 | 240 | </div> |
@@ -244,17 +244,17 @@ discard block |
||
244 | 244 | <thead> |
245 | 245 | <tr> |
246 | 246 | <th> |
247 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span> |
|
247 | + <span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span> |
|
248 | 248 | <div class="form-text text-muted help-text"> |
249 | - <?= $enc->html( $this->translate( 'admin', 'Configuration options, will be available as key/value pairs in the list item' ) ); ?> |
|
249 | + <?= $enc->html($this->translate('admin', 'Configuration options, will be available as key/value pairs in the list item')); ?> |
|
250 | 250 | </div> |
251 | 251 | </th> |
252 | 252 | <th> |
253 | - <?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?> |
|
253 | + <?= $enc->html($this->translate('admin', 'Value')); ?> |
|
254 | 254 | </th> |
255 | 255 | <th class="actions"> |
256 | - <div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
257 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
256 | + <div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
257 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
258 | 258 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
259 | 259 | v-on:click="addConfig(idx)" > |
260 | 260 | </div> |
@@ -267,21 +267,21 @@ discard block |
||
267 | 267 | <td> |
268 | 268 | <input is="auto-complete" |
269 | 269 | v-model="items[idx]['config']['key'][pos]" |
270 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'config', 'key', '' ) ) ); ?>'.replace('idx', idx)" |
|
270 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'config', 'key', ''))); ?>'.replace('idx', idx)" |
|
271 | 271 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
272 | - v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
272 | + v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
273 | 273 | v-bind:keys="[]" /> |
274 | 274 | </td> |
275 | 275 | <td> |
276 | - <input type="text" class="form-control" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
277 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'config', 'val', '' ) ) ); ?>'.replace('idx', idx)" |
|
276 | + <input type="text" class="form-control" tabindex="<?= $this->get('tabindex'); ?>" |
|
277 | + v-bind:name="'<?= $enc->attr($this->formparam(array('text', 'idx', 'config', 'val', ''))); ?>'.replace('idx', idx)" |
|
278 | 278 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
279 | 279 | v-model="items[idx]['config']['val'][pos]" /> |
280 | 280 | </td> |
281 | 281 | <td class="actions"> |
282 | 282 | <div v-if="!checkSite('service.lists.siteid', idx)" v-on:click="removeConfig(idx, pos)" |
283 | - class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
284 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
283 | + class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
284 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
285 | 285 | </div> |
286 | 286 | </td> |
287 | 287 | </tr> |
@@ -290,14 +290,14 @@ discard block |
||
290 | 290 | </table> |
291 | 291 | </div> |
292 | 292 | |
293 | - <?= $this->get( 'textBody' ); ?> |
|
293 | + <?= $this->get('textBody'); ?> |
|
294 | 294 | |
295 | 295 | </div> |
296 | 296 | </div> |
297 | 297 | |
298 | 298 | <div class="card-tools-more"> |
299 | - <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
300 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
299 | + <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
300 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
301 | 301 | v-on:click="addItem('service.lists.')" > |
302 | 302 | </div> |
303 | 303 | </div> |
@@ -115,9 +115,12 @@ discard block |
||
115 | 115 | <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
116 | 116 | </div> |
117 | 117 | </div> |
118 | - <?php else : ?> |
|
118 | + <?php else { |
|
119 | + : ?> |
|
119 | 120 | <input class="text-langid" type="hidden" |
120 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
121 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.languageid' ) ) ); |
|
122 | +} |
|
123 | +?>'.replace('idx', idx)" |
|
121 | 124 | value="<?= $enc->attr( key( $languages ) ); ?>" /> |
122 | 125 | <?php endif; ?> |
123 | 126 | |
@@ -146,9 +149,12 @@ discard block |
||
146 | 149 | <?= $enc->html( $this->translate( 'admin', 'Types for additional texts like per one lb/kg or per month' ) ); ?> |
147 | 150 | </div> |
148 | 151 | </div> |
149 | - <?php else : ?> |
|
152 | + <?php else { |
|
153 | + : ?> |
|
150 | 154 | <input class="item-type" type="hidden" |
151 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.type' ) ) ); ?>'.replace('idx', idx)" |
|
155 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'text.type' ) ) ); |
|
156 | +} |
|
157 | +?>'.replace('idx', idx)" |
|
152 | 158 | value="<?= $enc->attr( key( $textTypes ) ); ?>" /> |
153 | 159 | <?php endif; ?> |
154 | 160 | |
@@ -204,9 +210,12 @@ discard block |
||
204 | 210 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
205 | 211 | </div> |
206 | 212 | </div> |
207 | - <?php else : ?> |
|
213 | + <?php else { |
|
214 | + : ?> |
|
208 | 215 | <input class="listitem-type" type="hidden" |
209 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
216 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'text', 'idx', 'service.lists.type' ) ) ); |
|
217 | +} |
|
218 | +?>'.replace('idx', idx)" |
|
210 | 219 | value="<?= $enc->attr( key( $listTypes ) ); ?>" |
211 | 220 | v-model="items[idx]['service.lists.type']" /> |
212 | 221 | <?php endif; ?> |
@@ -8,30 +8,30 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
17 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
18 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
19 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
16 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
17 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
18 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
19 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
20 | 20 | |
21 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
22 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
23 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
24 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
21 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
22 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
23 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
24 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
25 | 25 | |
26 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
27 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
28 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
29 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
26 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
27 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
28 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
29 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
30 | 30 | |
31 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
32 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
33 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
34 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
31 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
32 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
33 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
34 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
35 | 35 | |
36 | 36 | |
37 | 37 | /** admin/jqadm/service/fields |
@@ -49,48 +49,48 @@ discard block |
||
49 | 49 | * @category Developer |
50 | 50 | */ |
51 | 51 | $default = ['service.status', 'service.type', 'service.label', 'service.provider']; |
52 | -$default = $this->config( 'admin/jqadm/service/fields', $default ); |
|
53 | -$fields = $this->session( 'aimeos/admin/jqadm/service/fields', $default ); |
|
52 | +$default = $this->config('admin/jqadm/service/fields', $default); |
|
53 | +$fields = $this->session('aimeos/admin/jqadm/service/fields', $default); |
|
54 | 54 | |
55 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
55 | +$searchParams = $params = $this->get('pageParams', []); |
|
56 | 56 | $searchParams['page']['start'] = 0; |
57 | 57 | |
58 | 58 | $typeList = []; |
59 | -foreach( $this->get( 'itemTypes', [] ) as $typeItem ) { |
|
59 | +foreach ($this->get('itemTypes', []) as $typeItem) { |
|
60 | 60 | $typeList[$typeItem->getCode()] = $typeItem->getCode(); |
61 | 61 | } |
62 | 62 | |
63 | 63 | $columnList = [ |
64 | - 'service.id' => $this->translate( 'admin', 'ID' ), |
|
65 | - 'service.status' => $this->translate( 'admin', 'Status' ), |
|
66 | - 'service.type' => $this->translate( 'admin', 'Type' ), |
|
67 | - 'service.position' => $this->translate( 'admin', 'Position' ), |
|
68 | - 'service.code' => $this->translate( 'admin', 'Code' ), |
|
69 | - 'service.label' => $this->translate( 'admin', 'Label' ), |
|
70 | - 'service.provider' => $this->translate( 'admin', 'Provider' ), |
|
71 | - 'service.datestart' => $this->translate( 'admin', 'Start date' ), |
|
72 | - 'service.dateend' => $this->translate( 'admin', 'End date' ), |
|
73 | - 'service.config' => $this->translate( 'admin', 'Config' ), |
|
74 | - 'service.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'service.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'service.editor' => $this->translate( 'admin', 'Editor' ), |
|
64 | + 'service.id' => $this->translate('admin', 'ID'), |
|
65 | + 'service.status' => $this->translate('admin', 'Status'), |
|
66 | + 'service.type' => $this->translate('admin', 'Type'), |
|
67 | + 'service.position' => $this->translate('admin', 'Position'), |
|
68 | + 'service.code' => $this->translate('admin', 'Code'), |
|
69 | + 'service.label' => $this->translate('admin', 'Label'), |
|
70 | + 'service.provider' => $this->translate('admin', 'Provider'), |
|
71 | + 'service.datestart' => $this->translate('admin', 'Start date'), |
|
72 | + 'service.dateend' => $this->translate('admin', 'End date'), |
|
73 | + 'service.config' => $this->translate('admin', 'Config'), |
|
74 | + 'service.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'service.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'service.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Service' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Service')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/service/filter', [] ), |
|
92 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/service/filter', []), |
|
92 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/service/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/service/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-product" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-product" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/service/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/service/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,15 +134,15 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/service/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/service/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'service.id' => ['op' => '=='], |
141 | 141 | 'service.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
143 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
144 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
145 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
142 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
143 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
144 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
145 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
146 | 146 | ]], |
147 | 147 | 'service.type' => ['op' => '==', 'type' => 'select', 'val' => $typeList], |
148 | 148 | 'service.position' => ['op' => '>=', 'type' => 'number'], |
@@ -159,67 +159,67 @@ discard block |
||
159 | 159 | ] ); |
160 | 160 | ?> |
161 | 161 | |
162 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
163 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
164 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
165 | - <?php if( in_array( 'service.id', $fields ) ) : ?> |
|
166 | - <td class="service-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
162 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
163 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
164 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
165 | + <?php if (in_array('service.id', $fields)) : ?> |
|
166 | + <td class="service-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
167 | 167 | <?php endif; ?> |
168 | - <?php if( in_array( 'service.status', $fields ) ) : ?> |
|
169 | - <td class="service-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
168 | + <?php if (in_array('service.status', $fields)) : ?> |
|
169 | + <td class="service-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
170 | 170 | <?php endif; ?> |
171 | - <?php if( in_array( 'service.type', $fields ) ) : ?> |
|
172 | - <td class="service-type"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getType() ); ?></a></td> |
|
171 | + <?php if (in_array('service.type', $fields)) : ?> |
|
172 | + <td class="service-type"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getType()); ?></a></td> |
|
173 | 173 | <?php endif; ?> |
174 | - <?php if( in_array( 'service.position', $fields ) ) : ?> |
|
175 | - <td class="service-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
174 | + <?php if (in_array('service.position', $fields)) : ?> |
|
175 | + <td class="service-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
176 | 176 | <?php endif; ?> |
177 | - <?php if( in_array( 'service.code', $fields ) ) : ?> |
|
178 | - <td class="service-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
177 | + <?php if (in_array('service.code', $fields)) : ?> |
|
178 | + <td class="service-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
179 | 179 | <?php endif; ?> |
180 | - <?php if( in_array( 'service.label', $fields ) ) : ?> |
|
181 | - <td class="service-label"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
180 | + <?php if (in_array('service.label', $fields)) : ?> |
|
181 | + <td class="service-label"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getLabel()); ?></a></td> |
|
182 | 182 | <?php endif; ?> |
183 | - <?php if( in_array( 'service.provider', $fields ) ) : ?> |
|
184 | - <td class="service-provider"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getProvider() ); ?></a></td> |
|
183 | + <?php if (in_array('service.provider', $fields)) : ?> |
|
184 | + <td class="service-provider"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getProvider()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'service.datestart', $fields ) ) : ?> |
|
187 | - <td class="service-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateStart() ); ?></a></td> |
|
186 | + <?php if (in_array('service.datestart', $fields)) : ?> |
|
187 | + <td class="service-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateStart()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'service.dateend', $fields ) ) : ?> |
|
190 | - <td class="service-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateEnd() ); ?></a></td> |
|
189 | + <?php if (in_array('service.dateend', $fields)) : ?> |
|
190 | + <td class="service-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateEnd()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'service.config', $fields ) ) : ?> |
|
192 | + <?php if (in_array('service.config', $fields)) : ?> |
|
193 | 193 | <td class="service-config config-item"> |
194 | 194 | <a class="items-field" href="<?= $url; ?>"> |
195 | - <?php foreach( $item->getConfig() as $key => $value ) : ?> |
|
196 | - <span class="config-key"><?= $enc->html( $key ); ?></span> |
|
197 | - <span class="config-value"><?= $enc->html( !is_scalar( $value ) ? json_encode( $value ) : $value ); ?></span> |
|
195 | + <?php foreach ($item->getConfig() as $key => $value) : ?> |
|
196 | + <span class="config-key"><?= $enc->html($key); ?></span> |
|
197 | + <span class="config-value"><?= $enc->html(!is_scalar($value) ? json_encode($value) : $value); ?></span> |
|
198 | 198 | <br/> |
199 | 199 | <?php endforeach; ?> |
200 | 200 | </a> |
201 | 201 | </td> |
202 | 202 | <?php endif; ?> |
203 | - <?php if( in_array( 'service.ctime', $fields ) ) : ?> |
|
204 | - <td class="service-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
203 | + <?php if (in_array('service.ctime', $fields)) : ?> |
|
204 | + <td class="service-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
205 | 205 | <?php endif; ?> |
206 | - <?php if( in_array( 'service.mtime', $fields ) ) : ?> |
|
207 | - <td class="service-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
206 | + <?php if (in_array('service.mtime', $fields)) : ?> |
|
207 | + <td class="service-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
208 | 208 | <?php endif; ?> |
209 | - <?php if( in_array( 'service.editor', $fields ) ) : ?> |
|
210 | - <td class="service-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
209 | + <?php if (in_array('service.editor', $fields)) : ?> |
|
210 | + <td class="service-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
211 | 211 | <?php endif; ?> |
212 | 212 | |
213 | 213 | <td class="actions"> |
214 | 214 | <a class="btn act-copy fa" tabindex="1" |
215 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
216 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
217 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
218 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
215 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
216 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
217 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
218 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
219 | 219 | <a class="btn act-delete fa" tabindex="1" |
220 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'service', 'id' => $id] + $params, [], $delConfig ) ); ?>" |
|
221 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
222 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
220 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'service', 'id' => $id] + $params, [], $delConfig)); ?>" |
|
221 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
222 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
223 | 223 | <?php endif; ?> |
224 | 224 | </td> |
225 | 225 | </tr> |
@@ -227,18 +227,18 @@ discard block |
||
227 | 227 | </tbody> |
228 | 228 | </table> |
229 | 229 | |
230 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
231 | - <?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?> |
|
230 | + <?php if ($this->get('items', []) === []) : ?> |
|
231 | + <?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?> |
|
232 | 232 | <?php endif; ?> |
233 | 233 | </form> |
234 | 234 | |
235 | 235 | <?= $this->partial( |
236 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
237 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
238 | - 'page' => $this->session( 'aimeos/admin/jqadm/service/page', [] )] |
|
236 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
237 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
238 | + 'page' => $this->session('aimeos/admin/jqadm/service/page', [])] |
|
239 | 239 | ); |
240 | 240 | ?> |
241 | 241 | |
242 | 242 | <?php $this->block()->stop(); ?> |
243 | 243 | |
244 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?> |
|
244 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?> |
@@ -13,15 +13,15 @@ discard block |
||
13 | 13 | 'price.siteid', 'price.type', 'price.currencyid', 'price.status', 'price.quantity', 'price.taxrate', 'price.value', 'price.rebate', 'price.costs' |
14 | 14 | ]; |
15 | 15 | |
16 | -$currencies = $this->get( 'priceCurrencies', [] ); |
|
16 | +$currencies = $this->get('priceCurrencies', []); |
|
17 | 17 | |
18 | 18 | |
19 | 19 | ?> |
20 | 20 | <div id="price" class="item-price content-block tab-pane fade" role="tablist" aria-labelledby="price"> |
21 | 21 | <div id="item-price-group" role="tablist" aria-multiselectable="true" |
22 | - data-items="<?= $enc->attr( json_encode( $this->get( 'priceData', [] ) ) ); ?>" |
|
23 | - data-listtype="<?= key( $this->get( 'priceListTypes', [] ) ) ?>" |
|
24 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
22 | + data-items="<?= $enc->attr(json_encode($this->get('priceData', []))); ?>" |
|
23 | + data-listtype="<?= key($this->get('priceListTypes', [])) ?>" |
|
24 | + data-keys="<?= $enc->attr(json_encode($keys)) ?>" |
|
25 | 25 | data-siteid="<?= $this->site()->siteid() ?>" > |
26 | 26 | |
27 | 27 | <div v-for="(entry, idx) in items" class="group-item card"> |
@@ -30,16 +30,16 @@ discard block |
||
30 | 30 | v-bind:data-target="'#item-price-group-data-' + idx" data-toggle="collapse" role="tab" class="card-header header" |
31 | 31 | v-bind:aria-controls="'item-price-group-data-' + idx" aria-expanded="false"> |
32 | 32 | <div class="card-tools-left"> |
33 | - <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
34 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry') ); ?>"> |
|
33 | + <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
34 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>"> |
|
35 | 35 | </div> |
36 | 36 | </div> |
37 | 37 | <span class="item-label header-label" v-html="getLabel(idx)"></span> |
38 | 38 | |
39 | 39 | <div class="card-tools-right"> |
40 | 40 | <div v-if="!checkSite('service.lists.siteid', idx)" |
41 | - class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
42 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
41 | + class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
42 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
43 | 43 | v-on:click.stop="removeItem(idx)"> |
44 | 44 | </div> |
45 | 45 | </div> |
@@ -49,60 +49,60 @@ discard block |
||
49 | 49 | v-bind:aria-labelledby="'item-price-group-item-' + idx" role="tabpanel" class="card-block collapse row"> |
50 | 50 | |
51 | 51 | <input type="hidden" v-model="items[idx]['price.id']" |
52 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.id' ) ) ); ?>'.replace('idx', idx)" /> |
|
52 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.id'))); ?>'.replace('idx', idx)" /> |
|
53 | 53 | |
54 | 54 | <div class="col-xl-6"> |
55 | 55 | |
56 | 56 | <div class="form-group row mandatory"> |
57 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Tax rate in %' ) ); ?></label> |
|
57 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Tax rate in %')); ?></label> |
|
58 | 58 | <div class="col-sm-8"> |
59 | - <input class="form-control item-taxrate" type="number" step="0.01" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
60 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.taxrate' ) ) ); ?>'.replace('idx', idx)" |
|
61 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Tax rate in %' ) ); ?>" |
|
59 | + <input class="form-control item-taxrate" type="number" step="0.01" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
60 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.taxrate'))); ?>'.replace('idx', idx)" |
|
61 | + placeholder="<?= $enc->attr($this->translate('admin', 'Tax rate in %')); ?>" |
|
62 | 62 | v-bind:readonly="checkSite('price.siteid', idx)" |
63 | 63 | v-model="items[idx]['price.taxrate']" /> |
64 | 64 | </div> |
65 | 65 | <div class="col-sm-12 form-text text-muted help-text"> |
66 | - <?= $enc->html( $this->translate( 'admin', 'Country specific tax rate to calculate and display the included tax (B2C) or add the tax if required (B2B)' ) ); ?> |
|
66 | + <?= $enc->html($this->translate('admin', 'Country specific tax rate to calculate and display the included tax (B2C) or add the tax if required (B2B)')); ?> |
|
67 | 67 | </div> |
68 | 68 | </div> |
69 | 69 | <div class="form-group row mandatory"> |
70 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Actual current price' ) ); ?></label> |
|
70 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Actual current price')); ?></label> |
|
71 | 71 | <div class="col-sm-8"> |
72 | - <input class="form-control item-value" type="number" step="0.01" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
73 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.value' ) ) ); ?>'.replace('idx', idx)" |
|
74 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Actual current price' ) ); ?>" |
|
72 | + <input class="form-control item-value" type="number" step="0.01" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
73 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.value'))); ?>'.replace('idx', idx)" |
|
74 | + placeholder="<?= $enc->attr($this->translate('admin', 'Actual current price')); ?>" |
|
75 | 75 | v-bind:readonly="checkSite('price.siteid', idx)" |
76 | 76 | v-model="items[idx]['price.value']" /> |
77 | 77 | </div> |
78 | 78 | <div class="col-sm-12 form-text text-muted help-text"> |
79 | - <?= $enc->html( $this->translate( 'admin', 'Actual price customers can buy the article for on the web site' ) ); ?> |
|
79 | + <?= $enc->html($this->translate('admin', 'Actual price customers can buy the article for on the web site')); ?> |
|
80 | 80 | </div> |
81 | 81 | </div> |
82 | 82 | <div class="form-group row optional"> |
83 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Substracted rebate amount' ) ); ?></label> |
|
83 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Substracted rebate amount')); ?></label> |
|
84 | 84 | <div class="col-sm-8"> |
85 | - <input class="form-control item-rebate" type="number" step="0.01" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
86 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.rebate' ) ) ); ?>'.replace('idx', idx)" |
|
87 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Substracted rebate amount' ) ); ?>" |
|
85 | + <input class="form-control item-rebate" type="number" step="0.01" tabindex="<?= $this->get('tabindex'); ?>" |
|
86 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.rebate'))); ?>'.replace('idx', idx)" |
|
87 | + placeholder="<?= $enc->attr($this->translate('admin', 'Substracted rebate amount')); ?>" |
|
88 | 88 | v-bind:readonly="checkSite('price.siteid', idx)" |
89 | 89 | v-model="items[idx]['price.rebate']" /> |
90 | 90 | </div> |
91 | 91 | <div class="col-sm-12 form-text text-muted help-text"> |
92 | - <?= $enc->html( $this->translate( 'admin', 'Reduction from the original price, used to calculate the rebate in % and the cross price' ) ); ?> |
|
92 | + <?= $enc->html($this->translate('admin', 'Reduction from the original price, used to calculate the rebate in % and the cross price')); ?> |
|
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | <div class="form-group row optional"> |
96 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Shipping/Payment costs' ) ); ?></label> |
|
96 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Shipping/Payment costs')); ?></label> |
|
97 | 97 | <div class="col-sm-8"> |
98 | - <input class="form-control item-costs" type="number" step="0.01" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
99 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.costs' ) ) ); ?>'.replace('idx', idx)" |
|
100 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Shipping/Payment costs' ) ); ?>" |
|
98 | + <input class="form-control item-costs" type="number" step="0.01" tabindex="<?= $this->get('tabindex'); ?>" |
|
99 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.costs'))); ?>'.replace('idx', idx)" |
|
100 | + placeholder="<?= $enc->attr($this->translate('admin', 'Shipping/Payment costs')); ?>" |
|
101 | 101 | v-bind:readonly="checkSite('price.siteid', idx)" |
102 | 102 | v-model="items[idx]['price.costs']" /> |
103 | 103 | </div> |
104 | 104 | <div class="col-sm-12 form-text text-muted help-text"> |
105 | - <?= $enc->html( $this->translate( 'admin', 'Additional delivery costs for each item, e.g. $20 for one heavy item will be $100 for five items it total' ) ); ?> |
|
105 | + <?= $enc->html($this->translate('admin', 'Additional delivery costs for each item, e.g. $20 for one heavy item will be $100 for five items it total')); ?> |
|
106 | 106 | </div> |
107 | 107 | </div> |
108 | 108 | |
@@ -111,43 +111,43 @@ discard block |
||
111 | 111 | <div class="col-xl-6"> |
112 | 112 | |
113 | 113 | <div class="form-group row mandatory"> |
114 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
114 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
115 | 115 | <div class="col-sm-8"> |
116 | - <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
117 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.status' ) ) ); ?>'.replace('idx', idx)" |
|
116 | + <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
117 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.status'))); ?>'.replace('idx', idx)" |
|
118 | 118 | v-bind:readonly="checkSite('price.siteid', idx)" |
119 | 119 | v-model="items[idx]['price.status']" > |
120 | 120 | <option value="1" v-bind:selected="items[idx]['price.status'] == 1" > |
121 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
121 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
122 | 122 | </option> |
123 | 123 | <option value="0" v-bind:selected="items[idx]['price.status'] == 0" > |
124 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
124 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
125 | 125 | </option> |
126 | 126 | <option value="-1" v-bind:selected="items[idx]['price.status'] == -1" > |
127 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
127 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
128 | 128 | </option> |
129 | 129 | <option value="-2" v-bind:selected="items[idx]['price.status'] == -2" > |
130 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
130 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
131 | 131 | </option> |
132 | 132 | </select> |
133 | 133 | </div> |
134 | 134 | </div> |
135 | 135 | |
136 | - <?php if( count( $currencies ) > 1 ) : ?> |
|
136 | + <?php if (count($currencies) > 1) : ?> |
|
137 | 137 | <div class="form-group row mandatory"> |
138 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Currency' ) ); ?></label> |
|
138 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Currency')); ?></label> |
|
139 | 139 | <div class="col-sm-8"> |
140 | - <select class="form-control custom-select item-currencyid" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
141 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); ?>'.replace('idx', idx)" |
|
140 | + <select class="form-control custom-select item-currencyid" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
141 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.currencyid'))); ?>'.replace('idx', idx)" |
|
142 | 142 | v-bind:readonly="checkSite('price.siteid', idx)" |
143 | 143 | v-model="items[idx]['price.currencyid']" > |
144 | 144 | <option value="" disabled> |
145 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
145 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
146 | 146 | </option> |
147 | 147 | |
148 | - <?php foreach( $currencies as $currencyId => $currencyItem ) : ?> |
|
149 | - <option value="<?= $enc->attr( $currencyItem->getCode() ); ?>" v-bind:selected="items[idx]['price.currencyid'] == '<?= $enc->attr( $currencyId ) ?>'" > |
|
150 | - <?= $enc->html( $currencyItem->getCode() ); ?> |
|
148 | + <?php foreach ($currencies as $currencyId => $currencyItem) : ?> |
|
149 | + <option value="<?= $enc->attr($currencyItem->getCode()); ?>" v-bind:selected="items[idx]['price.currencyid'] == '<?= $enc->attr($currencyId) ?>'" > |
|
150 | + <?= $enc->html($currencyItem->getCode()); ?> |
|
151 | 151 | </option> |
152 | 152 | <?php endforeach; ?> |
153 | 153 | |
@@ -156,51 +156,51 @@ discard block |
||
156 | 156 | </div> |
157 | 157 | <?php else : ?> |
158 | 158 | <input class="item-currencyid" type="hidden" |
159 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); ?>'.replace('idx', idx)" |
|
160 | - value="<?= $enc->attr( key( $currencies ) ); ?>" /> |
|
159 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.currencyid'))); ?>'.replace('idx', idx)" |
|
160 | + value="<?= $enc->attr(key($currencies)); ?>" /> |
|
161 | 161 | <?php endif; ?> |
162 | 162 | |
163 | - <?php $priceTypes = $this->get( 'priceTypes', [] ); ?> |
|
164 | - <?php if( count( $priceTypes ) > 1 ) : ?> |
|
163 | + <?php $priceTypes = $this->get('priceTypes', []); ?> |
|
164 | + <?php if (count($priceTypes) > 1) : ?> |
|
165 | 165 | <div class="form-group row mandatory"> |
166 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Type' ) ); ?></label> |
|
166 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Type')); ?></label> |
|
167 | 167 | <div class="col-sm-8"> |
168 | - <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
169 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); ?>'.replace('idx', idx)" |
|
168 | + <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
169 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.type'))); ?>'.replace('idx', idx)" |
|
170 | 170 | v-bind:readonly="checkSite('price.siteid', idx)" |
171 | 171 | v-model="items[idx]['price.type']" > |
172 | 172 | <option value=""> |
173 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
173 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
174 | 174 | </option> |
175 | 175 | |
176 | - <?php foreach( (array) $priceTypes as $typeItem ) : ?> |
|
177 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" v-bind:selected="items[idx]['price.type'] == '<?= $enc->attr( $typeItem->getCode() ) ?>'" > |
|
178 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
176 | + <?php foreach ((array) $priceTypes as $typeItem) : ?> |
|
177 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" v-bind:selected="items[idx]['price.type'] == '<?= $enc->attr($typeItem->getCode()) ?>'" > |
|
178 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
179 | 179 | </option> |
180 | 180 | <?php endforeach; ?> |
181 | 181 | </select> |
182 | 182 | </div> |
183 | 183 | <div class="col-sm-12 form-text text-muted help-text"> |
184 | - <?= $enc->html( $this->translate( 'admin', 'Types for additional prices like per one lb/kg or per month' ) ); ?> |
|
184 | + <?= $enc->html($this->translate('admin', 'Types for additional prices like per one lb/kg or per month')); ?> |
|
185 | 185 | </div> |
186 | 186 | </div> |
187 | 187 | <?php else : ?> |
188 | 188 | <input class="item-type" type="hidden" |
189 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); ?>'.replace('idx', idx)" |
|
190 | - value="<?= $enc->attr( key( $priceTypes ) ); ?>" /> |
|
189 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.type'))); ?>'.replace('idx', idx)" |
|
190 | + value="<?= $enc->attr(key($priceTypes)); ?>" /> |
|
191 | 191 | <?php endif; ?> |
192 | 192 | |
193 | 193 | <div class="form-group row mandatory"> |
194 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Minimum quantity' ) ); ?></label> |
|
194 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Minimum quantity')); ?></label> |
|
195 | 195 | <div class="col-sm-8"> |
196 | - <input class="form-control item-quantity" type="number" step="1" min="1" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
197 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.quantity' ) ) ); ?>'.replace('idx', idx)" |
|
198 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Minimum quantity' ) ); ?>" |
|
196 | + <input class="form-control item-quantity" type="number" step="1" min="1" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
197 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'price.quantity'))); ?>'.replace('idx', idx)" |
|
198 | + placeholder="<?= $enc->attr($this->translate('admin', 'Minimum quantity')); ?>" |
|
199 | 199 | v-bind:readonly="checkSite('price.siteid', idx)" |
200 | 200 | v-model="items[idx]['price.quantity']" /> |
201 | 201 | </div> |
202 | 202 | <div class="col-sm-12 form-text text-muted help-text"> |
203 | - <?= $enc->html( $this->translate( 'admin', 'Required quantity of articles for block pricing, e.g. one article for $5.00, ten articles for $45.00' ) ); ?> |
|
203 | + <?= $enc->html($this->translate('admin', 'Required quantity of articles for block pricing, e.g. one article for $5.00, ten articles for $45.00')); ?> |
|
204 | 204 | </div> |
205 | 205 | </div> |
206 | 206 | |
@@ -209,70 +209,70 @@ discard block |
||
209 | 209 | |
210 | 210 | <div v-on:click="toggle(idx)" class="col-xl-12 advanced" v-bind:class="{ 'collapsed': !advanced[idx] }"> |
211 | 211 | <div class="card-tools-left"> |
212 | - <div class="btn act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
213 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide advanced data') ); ?>"> |
|
212 | + <div class="btn act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
213 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide advanced data')); ?>"> |
|
214 | 214 | </div> |
215 | 215 | </div> |
216 | - <span class="header-label"><?= $enc->html( $this->translate( 'admin', 'Advanced' ) ); ?></span> |
|
216 | + <span class="header-label"><?= $enc->html($this->translate('admin', 'Advanced')); ?></span> |
|
217 | 217 | </div> |
218 | 218 | |
219 | 219 | <div v-show="advanced[idx]" class="col-xl-6 content-block secondary"> |
220 | 220 | |
221 | 221 | <input type="hidden" v-model="items[idx]['service.lists.type']" |
222 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.type' ) ) ); ?>'.replace( 'idx', idx )" /> |
|
222 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'service.lists.type'))); ?>'.replace( 'idx', idx )" /> |
|
223 | 223 | |
224 | - <?php $listTypes = $this->get( 'priceListTypes', [] ); ?> |
|
225 | - <?php if( count( $listTypes ) > 1 ) : ?> |
|
224 | + <?php $listTypes = $this->get('priceListTypes', []); ?> |
|
225 | + <?php if (count($listTypes) > 1) : ?> |
|
226 | 226 | <div class="form-group row mandatory"> |
227 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'List type' ) ); ?></label> |
|
227 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'List type')); ?></label> |
|
228 | 228 | <div class="col-sm-8"> |
229 | - <select class="form-control custom-select listitem-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
230 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
229 | + <select class="form-control custom-select listitem-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
230 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'service.lists.type'))); ?>'.replace('idx', idx)" |
|
231 | 231 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
232 | 232 | v-model="items[idx]['service.lists.type']" > |
233 | 233 | |
234 | - <?php foreach( $this->get( 'priceListTypes', [] ) as $typeItem ) : ?> |
|
235 | - <option value="<?= $enc->attr( $typeItem->getCode() ); ?>" v-bind:selected="entry['service.lists.type'] == '<?= $enc->attr( $typeItem->getCode() ) ?>'" > |
|
236 | - <?= $enc->html( $typeItem->getLabel() ); ?> |
|
234 | + <?php foreach ($this->get('priceListTypes', []) as $typeItem) : ?> |
|
235 | + <option value="<?= $enc->attr($typeItem->getCode()); ?>" v-bind:selected="entry['service.lists.type'] == '<?= $enc->attr($typeItem->getCode()) ?>'" > |
|
236 | + <?= $enc->html($typeItem->getLabel()); ?> |
|
237 | 237 | </option> |
238 | 238 | <?php endforeach; ?> |
239 | 239 | </select> |
240 | 240 | </div> |
241 | 241 | <div class="col-sm-12 form-text text-muted help-text"> |
242 | - <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
|
242 | + <?= $enc->html($this->translate('admin', 'Second level type for grouping items')); ?> |
|
243 | 243 | </div> |
244 | 244 | </div> |
245 | 245 | <?php else : ?> |
246 | 246 | <input class="listitem-type" type="hidden" |
247 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
248 | - value="<?= $enc->attr( key( $listTypes ) ); ?>" |
|
247 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'service.lists.type'))); ?>'.replace('idx', idx)" |
|
248 | + value="<?= $enc->attr(key($listTypes)); ?>" |
|
249 | 249 | v-model="items[idx]['service.lists.type']" /> |
250 | 250 | <?php endif; ?> |
251 | 251 | |
252 | 252 | <div class="form-group row optional"> |
253 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
253 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
254 | 254 | <div class="col-sm-8"> |
255 | - <input class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
256 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.datestart' ) ) ); ?>'.replace('idx', idx)" |
|
257 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
255 | + <input class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
256 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'service.lists.datestart'))); ?>'.replace('idx', idx)" |
|
257 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
258 | 258 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
259 | 259 | v-model="items[idx]['service.lists.datestart']" /> |
260 | 260 | </div> |
261 | 261 | <div class="col-sm-12 form-text text-muted help-text"> |
262 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site after that date and time' ) ); ?> |
|
262 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site after that date and time')); ?> |
|
263 | 263 | </div> |
264 | 264 | </div> |
265 | 265 | <div class="form-group row optional"> |
266 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
266 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
267 | 267 | <div class="col-sm-8"> |
268 | - <input class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
269 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.dateend' ) ) ); ?>'.replace('idx', idx)" |
|
270 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
268 | + <input class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
269 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'service.lists.dateend'))); ?>'.replace('idx', idx)" |
|
270 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
271 | 271 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
272 | 272 | v-model="items[idx]['service.lists.dateend']" /> |
273 | 273 | </div> |
274 | 274 | <div class="col-sm-12 form-text text-muted help-text"> |
275 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site until that date and time' ) ); ?> |
|
275 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site until that date and time')); ?> |
|
276 | 276 | </div> |
277 | 277 | </div> |
278 | 278 | </div> |
@@ -282,17 +282,17 @@ discard block |
||
282 | 282 | <thead> |
283 | 283 | <tr> |
284 | 284 | <th> |
285 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span> |
|
285 | + <span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span> |
|
286 | 286 | <div class="form-text text-muted help-text"> |
287 | - <?= $enc->html( $this->translate( 'admin', 'Configuration options, will be available as key/value pairs in the list item' ) ); ?> |
|
287 | + <?= $enc->html($this->translate('admin', 'Configuration options, will be available as key/value pairs in the list item')); ?> |
|
288 | 288 | </div> |
289 | 289 | </th> |
290 | 290 | <th> |
291 | - <?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?> |
|
291 | + <?= $enc->html($this->translate('admin', 'Value')); ?> |
|
292 | 292 | </th> |
293 | 293 | <th class="actions"> |
294 | - <div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
295 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
294 | + <div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
295 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
296 | 296 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
297 | 297 | v-on:click="addConfig(idx)" > |
298 | 298 | </div> |
@@ -305,21 +305,21 @@ discard block |
||
305 | 305 | <td> |
306 | 306 | <input is="auto-complete" |
307 | 307 | v-model="items[idx]['config']['key'][pos]" |
308 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'config', 'key', '' ) ) ); ?>'.replace('idx', idx)" |
|
308 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'config', 'key', ''))); ?>'.replace('idx', idx)" |
|
309 | 309 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
310 | - v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
310 | + v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
311 | 311 | v-bind:keys="[]" /> |
312 | 312 | </td> |
313 | 313 | <td> |
314 | - <input type="text" class="form-control" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
315 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'config', 'val', '' ) ) ); ?>'.replace('idx', idx)" |
|
314 | + <input type="text" class="form-control" tabindex="<?= $this->get('tabindex'); ?>" |
|
315 | + v-bind:name="'<?= $enc->attr($this->formparam(array('price', 'idx', 'config', 'val', ''))); ?>'.replace('idx', idx)" |
|
316 | 316 | v-bind:readonly="checkSite('service.lists.siteid', idx)" |
317 | 317 | v-model="items[idx]['config']['val'][pos]" /> |
318 | 318 | </td> |
319 | 319 | <td class="actions"> |
320 | 320 | <div v-if="!checkSite('service.lists.siteid', idx)" v-on:click="removeConfig(idx, pos)" |
321 | - class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
322 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
321 | + class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
322 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
323 | 323 | </div> |
324 | 324 | </td> |
325 | 325 | </tr> |
@@ -328,14 +328,14 @@ discard block |
||
328 | 328 | </table> |
329 | 329 | </div> |
330 | 330 | |
331 | - <?= $this->get( 'priceBody' ); ?> |
|
331 | + <?= $this->get('priceBody'); ?> |
|
332 | 332 | |
333 | 333 | </div> |
334 | 334 | </div> |
335 | 335 | |
336 | 336 | <div class="card-tools-more"> |
337 | - <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
338 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
337 | + <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
338 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
339 | 339 | v-on:click="addItem('service.lists.')" > |
340 | 340 | </div> |
341 | 341 | </div> |
@@ -154,9 +154,12 @@ discard block |
||
154 | 154 | </select> |
155 | 155 | </div> |
156 | 156 | </div> |
157 | - <?php else : ?> |
|
157 | + <?php else { |
|
158 | + : ?> |
|
158 | 159 | <input class="item-currencyid" type="hidden" |
159 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); ?>'.replace('idx', idx)" |
|
160 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.currencyid' ) ) ); |
|
161 | +} |
|
162 | +?>'.replace('idx', idx)" |
|
160 | 163 | value="<?= $enc->attr( key( $currencies ) ); ?>" /> |
161 | 164 | <?php endif; ?> |
162 | 165 | |
@@ -184,9 +187,12 @@ discard block |
||
184 | 187 | <?= $enc->html( $this->translate( 'admin', 'Types for additional prices like per one lb/kg or per month' ) ); ?> |
185 | 188 | </div> |
186 | 189 | </div> |
187 | - <?php else : ?> |
|
190 | + <?php else { |
|
191 | + : ?> |
|
188 | 192 | <input class="item-type" type="hidden" |
189 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); ?>'.replace('idx', idx)" |
|
193 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'price.type' ) ) ); |
|
194 | +} |
|
195 | +?>'.replace('idx', idx)" |
|
190 | 196 | value="<?= $enc->attr( key( $priceTypes ) ); ?>" /> |
191 | 197 | <?php endif; ?> |
192 | 198 | |
@@ -242,9 +248,12 @@ discard block |
||
242 | 248 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
243 | 249 | </div> |
244 | 250 | </div> |
245 | - <?php else : ?> |
|
251 | + <?php else { |
|
252 | + : ?> |
|
246 | 253 | <input class="listitem-type" type="hidden" |
247 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.type' ) ) ); ?>'.replace('idx', idx)" |
|
254 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'price', 'idx', 'service.lists.type' ) ) ); |
|
255 | +} |
|
256 | +?>'.replace('idx', idx)" |
|
248 | 257 | value="<?= $enc->attr( key( $listTypes ) ); ?>" |
249 | 258 | v-model="items[idx]['service.lists.type']" /> |
250 | 259 | <?php endif; ?> |
@@ -140,14 +140,12 @@ discard block |
||
140 | 140 | |
141 | 141 | $manager->commit(); |
142 | 142 | return; |
143 | - } |
|
144 | - catch( \Aimeos\MShop\Exception $e ) |
|
143 | + } catch( \Aimeos\MShop\Exception $e ) |
|
145 | 144 | { |
146 | 145 | $error = array( 'product-item-stock' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
147 | 146 | $view->errors = $view->get( 'errors', [] ) + $error; |
148 | 147 | $this->logException( $e ); |
149 | - } |
|
150 | - catch( \Exception $e ) |
|
148 | + } catch( \Exception $e ) |
|
151 | 149 | { |
152 | 150 | $error = array( 'product-item-stock' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
153 | 151 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -330,8 +328,7 @@ discard block |
||
330 | 328 | { |
331 | 329 | $stockItem = $stockItems[$id]; |
332 | 330 | unset( $stockItems[$id] ); |
333 | - } |
|
334 | - else |
|
331 | + } else |
|
335 | 332 | { |
336 | 333 | $stockItem = $manager->createItem()->setType( $type ); |
337 | 334 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Stock; |
12 | 12 | |
13 | -sprintf( 'stock' ); // for translation |
|
13 | +sprintf('stock'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -42,16 +42,16 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function copy() |
44 | 44 | { |
45 | - $view = $this->addViewData( $this->getView() ); |
|
45 | + $view = $this->addViewData($this->getView()); |
|
46 | 46 | |
47 | - $view->stockData = $this->toArray( $view->item, true ); |
|
47 | + $view->stockData = $this->toArray($view->item, true); |
|
48 | 48 | $view->stockBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->stockBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -62,22 +62,22 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function create() |
64 | 64 | { |
65 | - $view = $this->addViewData( $this->getView() ); |
|
65 | + $view = $this->addViewData($this->getView()); |
|
66 | 66 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = $view->param( 'stock', [] ); |
|
67 | + $data = $view->param('stock', []); |
|
68 | 68 | |
69 | - foreach( $view->value( $data, 'stock.id', [] ) as $idx => $value ) { |
|
69 | + foreach ($view->value($data, 'stock.id', []) as $idx => $value) { |
|
70 | 70 | $data['stock.siteid'][$idx] = $siteid; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $view->stockData = $data; |
74 | 74 | $view->stockBody = ''; |
75 | 75 | |
76 | - foreach( $this->getSubClients() as $client ) { |
|
76 | + foreach ($this->getSubClients() as $client) { |
|
77 | 77 | $view->stockBody .= $client->create(); |
78 | 78 | } |
79 | 79 | |
80 | - return $this->render( $view ); |
|
80 | + return $this->render($view); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | { |
89 | 89 | parent::delete(); |
90 | 90 | |
91 | - $manager = \Aimeos\MShop::create( $this->getContext(), 'stock' ); |
|
91 | + $manager = \Aimeos\MShop::create($this->getContext(), 'stock'); |
|
92 | 92 | |
93 | 93 | $code = $this->getView()->item->getCode(); |
94 | 94 | $search = $manager->createSearch(); |
95 | - $search->setConditions( $search->compare( '==', 'stock.productcode', $code ) ); |
|
95 | + $search->setConditions($search->compare('==', 'stock.productcode', $code)); |
|
96 | 96 | |
97 | - $manager->deleteItems( array_keys( $manager->searchItems( $search ) ) ); |
|
97 | + $manager->deleteItems(array_keys($manager->searchItems($search))); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | |
@@ -105,16 +105,16 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function get() |
107 | 107 | { |
108 | - $view = $this->addViewData( $this->getView() ); |
|
108 | + $view = $this->addViewData($this->getView()); |
|
109 | 109 | |
110 | - $view->stockData = $this->toArray( $view->item ); |
|
110 | + $view->stockData = $this->toArray($view->item); |
|
111 | 111 | $view->stockBody = ''; |
112 | 112 | |
113 | - foreach( $this->getSubClients() as $client ) { |
|
113 | + foreach ($this->getSubClients() as $client) { |
|
114 | 114 | $view->stockBody .= $client->get(); |
115 | 115 | } |
116 | 116 | |
117 | - return $this->render( $view ); |
|
117 | + return $this->render($view); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | |
@@ -126,32 +126,32 @@ discard block |
||
126 | 126 | $view = $this->getView(); |
127 | 127 | $context = $this->getContext(); |
128 | 128 | |
129 | - $manager = \Aimeos\MShop::create( $context, 'stock' ); |
|
129 | + $manager = \Aimeos\MShop::create($context, 'stock'); |
|
130 | 130 | $manager->begin(); |
131 | 131 | |
132 | 132 | try |
133 | 133 | { |
134 | - $this->fromArray( $view->item, $view->param( 'stock', [] ) ); |
|
134 | + $this->fromArray($view->item, $view->param('stock', [])); |
|
135 | 135 | $view->stockBody = ''; |
136 | 136 | |
137 | - foreach( $this->getSubClients() as $client ) { |
|
137 | + foreach ($this->getSubClients() as $client) { |
|
138 | 138 | $view->stockBody .= $client->save(); |
139 | 139 | } |
140 | 140 | |
141 | 141 | $manager->commit(); |
142 | 142 | return; |
143 | 143 | } |
144 | - catch( \Aimeos\MShop\Exception $e ) |
|
144 | + catch (\Aimeos\MShop\Exception $e) |
|
145 | 145 | { |
146 | - $error = array( 'product-item-stock' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
147 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
148 | - $this->logException( $e ); |
|
146 | + $error = array('product-item-stock' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
147 | + $view->errors = $view->get('errors', []) + $error; |
|
148 | + $this->logException($e); |
|
149 | 149 | } |
150 | - catch( \Exception $e ) |
|
150 | + catch (\Exception $e) |
|
151 | 151 | { |
152 | - $error = array( 'product-item-stock' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
153 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
154 | - $this->logException( $e ); |
|
152 | + $error = array('product-item-stock' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
153 | + $view->errors = $view->get('errors', []) + $error; |
|
154 | + $this->logException($e); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | $manager->rollback(); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @param string|null $name Name of the sub-client (Default if null) |
168 | 168 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
169 | 169 | */ |
170 | - public function getSubClient( $type, $name = null ) |
|
170 | + public function getSubClient($type, $name = null) |
|
171 | 171 | { |
172 | 172 | /** admin/jqadm/product/stock/decorators/excludes |
173 | 173 | * Excludes decorators added by the "common" option from the product JQAdm client |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | * @see admin/jqadm/product/stock/decorators/excludes |
243 | 243 | * @see admin/jqadm/product/stock/decorators/global |
244 | 244 | */ |
245 | - return $this->createSubClient( 'product/stock/' . $type, $name ); |
|
245 | + return $this->createSubClient('product/stock/' . $type, $name); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | |
@@ -252,11 +252,11 @@ discard block |
||
252 | 252 | * @param \Aimeos\MW\View\Iface $view View object |
253 | 253 | * @return \Aimeos\MW\View\Iface View object with assigned parameters |
254 | 254 | */ |
255 | - protected function addViewData( \Aimeos\MW\View\Iface $view ) |
|
255 | + protected function addViewData(\Aimeos\MW\View\Iface $view) |
|
256 | 256 | { |
257 | - $typeManager = \Aimeos\MShop::create( $this->getContext(), 'stock/type' ); |
|
257 | + $typeManager = \Aimeos\MShop::create($this->getContext(), 'stock/type'); |
|
258 | 258 | |
259 | - $view->stockTypes = $typeManager->searchItems( $typeManager->createSearch() ); |
|
259 | + $view->stockTypes = $typeManager->searchItems($typeManager->createSearch()); |
|
260 | 260 | |
261 | 261 | return $view; |
262 | 262 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | * @since 2016.01 |
303 | 303 | * @category Developer |
304 | 304 | */ |
305 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/stock/standard/subparts', [] ); |
|
305 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/stock/standard/subparts', []); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | |
@@ -312,38 +312,38 @@ discard block |
||
312 | 312 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
313 | 313 | * @param string[] $data Data array |
314 | 314 | */ |
315 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
315 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
316 | 316 | { |
317 | - $manager = \Aimeos\MShop::create( $this->getContext(), 'stock' ); |
|
317 | + $manager = \Aimeos\MShop::create($this->getContext(), 'stock'); |
|
318 | 318 | |
319 | 319 | $search = $manager->createSearch(); |
320 | - $search->setConditions( $search->compare( '==', 'stock.productcode', $item->getCode() ) ); |
|
321 | - $stockItems = $manager->searchitems( $search ); |
|
320 | + $search->setConditions($search->compare('==', 'stock.productcode', $item->getCode())); |
|
321 | + $stockItems = $manager->searchitems($search); |
|
322 | 322 | |
323 | - $list = (array) $this->getValue( $data, 'stock.id', [] ); |
|
323 | + $list = (array) $this->getValue($data, 'stock.id', []); |
|
324 | 324 | |
325 | - foreach( $list as $idx => $id ) |
|
325 | + foreach ($list as $idx => $id) |
|
326 | 326 | { |
327 | - $type = $this->getValue( $data, 'stock.type/' . $idx ); |
|
327 | + $type = $this->getValue($data, 'stock.type/' . $idx); |
|
328 | 328 | |
329 | - if( isset( $stockItems[$id] ) && $stockItems[$id]->getType() == $type ) |
|
329 | + if (isset($stockItems[$id]) && $stockItems[$id]->getType() == $type) |
|
330 | 330 | { |
331 | 331 | $stockItem = $stockItems[$id]; |
332 | - unset( $stockItems[$id] ); |
|
332 | + unset($stockItems[$id]); |
|
333 | 333 | } |
334 | 334 | else |
335 | 335 | { |
336 | - $stockItem = $manager->createItem()->setType( $type ); |
|
336 | + $stockItem = $manager->createItem()->setType($type); |
|
337 | 337 | } |
338 | 338 | |
339 | - $stockItem->setProductCode( $item->getCode() ); |
|
340 | - $stockItem->setStocklevel( $this->getValue( $data, 'stock.stocklevel/' . $idx ) ); |
|
341 | - $stockItem->setDateBack( $this->getValue( $data, 'stock.dateback/' . $idx ) ); |
|
339 | + $stockItem->setProductCode($item->getCode()); |
|
340 | + $stockItem->setStocklevel($this->getValue($data, 'stock.stocklevel/' . $idx)); |
|
341 | + $stockItem->setDateBack($this->getValue($data, 'stock.dateback/' . $idx)); |
|
342 | 342 | |
343 | - $manager->saveItem( $stockItem, false ); |
|
343 | + $manager->saveItem($stockItem, false); |
|
344 | 344 | } |
345 | 345 | |
346 | - $manager->deleteItems( array_keys( $stockItems ) ); |
|
346 | + $manager->deleteItems(array_keys($stockItems)); |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | |
@@ -354,30 +354,30 @@ discard block |
||
354 | 354 | * @param boolean $copy True if items should be copied, false if not |
355 | 355 | * @return string[] Multi-dimensional associative list of item data |
356 | 356 | */ |
357 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
357 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
358 | 358 | { |
359 | 359 | $data = []; |
360 | 360 | $context = $this->getContext(); |
361 | 361 | $siteId = $context->getLocale()->getSiteId(); |
362 | - $manager = \Aimeos\MShop::create( $context, 'stock' ); |
|
362 | + $manager = \Aimeos\MShop::create($context, 'stock'); |
|
363 | 363 | |
364 | 364 | $search = $manager->createSearch(); |
365 | - $search->setConditions( $search->compare( '==', 'stock.productcode', $item->getCode() ) ); |
|
366 | - $search->setSortations( array( $search->sort( '+', 'stock.type' ) ) ); |
|
365 | + $search->setConditions($search->compare('==', 'stock.productcode', $item->getCode())); |
|
366 | + $search->setSortations(array($search->sort('+', 'stock.type'))); |
|
367 | 367 | |
368 | - foreach( $manager->searchItems( $search ) as $stockItem ) |
|
368 | + foreach ($manager->searchItems($search) as $stockItem) |
|
369 | 369 | { |
370 | - $list = $stockItem->toArray( true ); |
|
370 | + $list = $stockItem->toArray(true); |
|
371 | 371 | |
372 | - if( $copy === true ) |
|
372 | + if ($copy === true) |
|
373 | 373 | { |
374 | 374 | $list['stock.siteid'] = $siteId; |
375 | 375 | $list['stock.id'] = ''; |
376 | 376 | } |
377 | 377 | |
378 | - $list['stock.dateback'] = str_replace( ' ', 'T', $list['stock.dateback'] ); |
|
378 | + $list['stock.dateback'] = str_replace(' ', 'T', $list['stock.dateback']); |
|
379 | 379 | |
380 | - foreach( $list as $key => $value ) { |
|
380 | + foreach ($list as $key => $value) { |
|
381 | 381 | $data[$key][] = $value; |
382 | 382 | } |
383 | 383 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
393 | 393 | * @return string HTML output |
394 | 394 | */ |
395 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
395 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
396 | 396 | { |
397 | 397 | /** admin/jqadm/product/stock/template-item |
398 | 398 | * Relative path to the HTML body template of the stock subpart for products. |
@@ -416,6 +416,6 @@ discard block |
||
416 | 416 | $tplconf = 'admin/jqadm/product/stock/template-item'; |
417 | 417 | $default = 'product/item-stock-standard'; |
418 | 418 | |
419 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
419 | + return $view->render($view->config($tplconf, $default)); |
|
420 | 420 | } |
421 | 421 | } |
@@ -270,8 +270,7 @@ |
||
270 | 270 | $listItem = $listManager->createItem()->setType( 'custom' )->setRefId( $attrId ); |
271 | 271 | $item->addListItem( 'attribute', $listItem, $listItem->getRefItem() ); |
272 | 272 | } |
273 | - } |
|
274 | - else |
|
273 | + } else |
|
275 | 274 | { |
276 | 275 | if( ( $litem = $item->getListItem( 'attribute', 'custom', $attrId, false ) ) !== null ) { |
277 | 276 | $item->deleteListItem( 'attribute', $litem ); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Special\Price; |
12 | 12 | |
13 | -sprintf( 'special' ); // for translation |
|
13 | +sprintf('special'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->specialpriceData = $this->toArray( $view->item, true ); |
|
47 | + $view->specialpriceData = $this->toArray($view->item, true); |
|
48 | 48 | $view->specialpriceBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->specialpriceBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | 66 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = $view->param( 'specialprice', [] ); |
|
67 | + $data = $view->param('specialprice', []); |
|
68 | 68 | |
69 | - foreach( $view->value( $data, 'product.lists.id', [] ) as $idx => $value ) { |
|
69 | + foreach ($view->value($data, 'product.lists.id', []) as $idx => $value) { |
|
70 | 70 | $data['product.lists.siteid'][$idx] = $siteid; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $view->specialpriceData = $data; |
74 | 74 | $view->specialpriceBody = ''; |
75 | 75 | |
76 | - foreach( $this->getSubClients() as $client ) { |
|
76 | + foreach ($this->getSubClients() as $client) { |
|
77 | 77 | $view->specialpriceBody .= $client->create(); |
78 | 78 | } |
79 | 79 | |
80 | - return $this->render( $view ); |
|
80 | + return $this->render($view); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | { |
91 | 91 | $view = $this->getView(); |
92 | 92 | |
93 | - $view->specialpriceData = $this->toArray( $view->item ); |
|
93 | + $view->specialpriceData = $this->toArray($view->item); |
|
94 | 94 | $view->specialpriceBody = ''; |
95 | 95 | |
96 | - foreach( $this->getSubClients() as $client ) { |
|
96 | + foreach ($this->getSubClients() as $client) { |
|
97 | 97 | $view->specialpriceBody .= $client->get(); |
98 | 98 | } |
99 | 99 | |
100 | - return $this->render( $view ); |
|
100 | + return $this->render($view); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | { |
109 | 109 | $view = $this->getView(); |
110 | 110 | |
111 | - $this->fromArray( $view->item, $view->param( 'specialprice', [] ) ); |
|
111 | + $this->fromArray($view->item, $view->param('specialprice', [])); |
|
112 | 112 | $view->specialpriceBody = ''; |
113 | 113 | |
114 | - foreach( $this->getSubClients() as $client ) { |
|
114 | + foreach ($this->getSubClients() as $client) { |
|
115 | 115 | $view->specialpriceBody .= $client->save(); |
116 | 116 | } |
117 | 117 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * @param string|null $name Name of the sub-client (Default if null) |
125 | 125 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
126 | 126 | */ |
127 | - public function getSubClient( $type, $name = null ) |
|
127 | + public function getSubClient($type, $name = null) |
|
128 | 128 | { |
129 | 129 | /** admin/jqadm/product/special/price/decorators/excludes |
130 | 130 | * Excludes decorators added by the "common" option from the product JQAdm client |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | * @see admin/jqadm/product/special/price/decorators/excludes |
200 | 200 | * @see admin/jqadm/product/special/price/decorators/global |
201 | 201 | */ |
202 | - return $this->createSubClient( 'product/special/price/' . $type, $name ); |
|
202 | + return $this->createSubClient('product/special/price/' . $type, $name); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | * @since 2016.03 |
244 | 244 | * @category Developer |
245 | 245 | */ |
246 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/special/price/standard/subparts', [] ); |
|
246 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/special/price/standard/subparts', []); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | |
@@ -253,28 +253,28 @@ discard block |
||
253 | 253 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
254 | 254 | * @param string[] $data Data array |
255 | 255 | */ |
256 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
256 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
257 | 257 | { |
258 | 258 | $context = $this->getContext(); |
259 | 259 | |
260 | - $attrManager = \Aimeos\MShop::create( $context, 'attribute' ); |
|
261 | - $listManager = \Aimeos\MShop::create( $context, 'product/lists' ); |
|
262 | - $typeManager = \Aimeos\MShop::create( $context, 'product/lists/type' ); |
|
260 | + $attrManager = \Aimeos\MShop::create($context, 'attribute'); |
|
261 | + $listManager = \Aimeos\MShop::create($context, 'product/lists'); |
|
262 | + $typeManager = \Aimeos\MShop::create($context, 'product/lists/type'); |
|
263 | 263 | |
264 | - $attrId = $attrManager->findItem( 'custom', [], 'product', 'price' )->getId(); |
|
264 | + $attrId = $attrManager->findItem('custom', [], 'product', 'price')->getId(); |
|
265 | 265 | |
266 | - if( $this->getValue( $data, 'custom', 0 ) == 1 ) |
|
266 | + if ($this->getValue($data, 'custom', 0) == 1) |
|
267 | 267 | { |
268 | - if( $item->getListItem( 'attribute', 'custom', $attrId, false ) === null ) |
|
268 | + if ($item->getListItem('attribute', 'custom', $attrId, false) === null) |
|
269 | 269 | { |
270 | - $listItem = $listManager->createItem()->setType( 'custom' )->setRefId( $attrId ); |
|
271 | - $item->addListItem( 'attribute', $listItem, $listItem->getRefItem() ); |
|
270 | + $listItem = $listManager->createItem()->setType('custom')->setRefId($attrId); |
|
271 | + $item->addListItem('attribute', $listItem, $listItem->getRefItem()); |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | else |
275 | 275 | { |
276 | - if( ( $litem = $item->getListItem( 'attribute', 'custom', $attrId, false ) ) !== null ) { |
|
277 | - $item->deleteListItem( 'attribute', $litem ); |
|
276 | + if (($litem = $item->getListItem('attribute', 'custom', $attrId, false)) !== null) { |
|
277 | + $item->deleteListItem('attribute', $litem); |
|
278 | 278 | } |
279 | 279 | } |
280 | 280 | } |
@@ -287,13 +287,13 @@ discard block |
||
287 | 287 | * @param boolean $copy True if items should be copied, false if not |
288 | 288 | * @return string[] Multi-dimensional associative list of item data |
289 | 289 | */ |
290 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
290 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
291 | 291 | { |
292 | 292 | $data = []; |
293 | 293 | |
294 | - foreach( $item->getListItems( 'attribute', 'custom', null, false ) as $listItem ) |
|
294 | + foreach ($item->getListItems('attribute', 'custom', null, false) as $listItem) |
|
295 | 295 | { |
296 | - if( ( $refItem = $listItem->getRefItem() ) !== null && $refItem->getType() === 'price' ) { |
|
296 | + if (($refItem = $listItem->getRefItem()) !== null && $refItem->getType() === 'price') { |
|
297 | 297 | $data['custom'] = 1; |
298 | 298 | } |
299 | 299 | } |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
309 | 309 | * @return string HTML output |
310 | 310 | */ |
311 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
311 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
312 | 312 | { |
313 | 313 | /** admin/jqadm/product/special/price/template-item |
314 | 314 | * Relative path to the HTML body template of the special subpart for products. |
@@ -332,6 +332,6 @@ discard block |
||
332 | 332 | $tplconf = 'admin/jqadm/product/special/price/template-item'; |
333 | 333 | $default = 'product/item-special-price-standard'; |
334 | 334 | |
335 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
335 | + return $view->render($view->config($tplconf, $default)); |
|
336 | 336 | } |
337 | 337 | } |
338 | 338 | \ No newline at end of file |