Completed
Push — master ( 0229de...f71bfb )
by Aimeos
04:41
created
admin/jqadm/templates/supplier/item-standard.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -5,38 +5,38 @@  discard block
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2017-2018
6 6
  */
7 7
 
8
-$selected = function( $key, $code ) {
9
-	return ( $key == $code ? 'selected="selected"' : '' );
8
+$selected = function($key, $code) {
9
+	return ($key == $code ? 'selected="selected"' : '');
10 10
 };
11 11
 
12 12
 $enc = $this->encoder();
13 13
 
14 14
 
15
-$target = $this->config( 'admin/jqadm/url/save/target' );
16
-$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' );
17
-$action = $this->config( 'admin/jqadm/url/save/action', 'save' );
18
-$config = $this->config( 'admin/jqadm/url/save/config', [] );
15
+$target = $this->config('admin/jqadm/url/save/target');
16
+$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm');
17
+$action = $this->config('admin/jqadm/url/save/action', 'save');
18
+$config = $this->config('admin/jqadm/url/save/config', []);
19 19
 
20
-$params = $this->get( 'pageParams', [] );
20
+$params = $this->get('pageParams', []);
21 21
 
22 22
 
23 23
 ?>
24
-<?php $this->block()->start( 'jqadm_content' ); ?>
24
+<?php $this->block()->start('jqadm_content'); ?>
25 25
 
26
-<form class="item item-supplier form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>">
27
-	<input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'supplier.id' ) ) ); ?>" value="<?= $enc->attr( $this->get( 'itemData/supplier.id' ) ); ?>" />
28
-	<input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" />
26
+<form class="item item-supplier form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>">
27
+	<input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'supplier.id'))); ?>" value="<?= $enc->attr($this->get('itemData/supplier.id')); ?>" />
28
+	<input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" />
29 29
 	<?= $this->csrf()->formfield(); ?>
30 30
 
31 31
 	<nav class="main-navbar">
32 32
 		<span class="navbar-brand">
33
-			<?= $enc->html( $this->translate( 'admin', 'Supplier' ) ); ?>:
34
-			<?= $enc->html( $this->get( 'itemData/supplier.id' ) ); ?> -
35
-			<?= $enc->html( $this->get( 'itemData/supplier.label', $this->translate( 'admin', 'New' ) ) ); ?>
36
-			<span class="navbar-secondary">(<?= $enc->html( $this->site()->match( $this->get( 'itemData/supplier.siteid' ) ) ); ?>)</span>
33
+			<?= $enc->html($this->translate('admin', 'Supplier')); ?>:
34
+			<?= $enc->html($this->get('itemData/supplier.id')); ?> -
35
+			<?= $enc->html($this->get('itemData/supplier.label', $this->translate('admin', 'New'))); ?>
36
+			<span class="navbar-secondary">(<?= $enc->html($this->site()->match($this->get('itemData/supplier.siteid'))); ?>)</span>
37 37
 		</span>
38 38
 		<div class="item-actions">
39
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
39
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
40 40
 		</div>
41 41
 	</nav>
42 42
 
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 
48 48
 				<li class="nav-item basic">
49 49
 					<a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic">
50
-						<?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?>
50
+						<?= $enc->html($this->translate('admin', 'Basic')); ?>
51 51
 					</a>
52 52
 				</li>
53 53
 
54
-				<?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?>
55
-					<li class="nav-item <?= $enc->attr( $subpart ); ?>">
56
-						<a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx+1; ?>">
57
-							<?= $enc->html( $this->translate( 'admin', $subpart ) ); ?>
54
+				<?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?>
55
+					<li class="nav-item <?= $enc->attr($subpart); ?>">
56
+						<a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>">
57
+							<?= $enc->html($this->translate('admin', $subpart)); ?>
58 58
 						</a>
59 59
 					</li>
60 60
 				<?php endforeach; ?>
@@ -63,85 +63,85 @@  discard block
 block discarded – undo
63 63
 
64 64
 			<div class="item-meta text-muted">
65 65
 				<small>
66
-					<?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>:
67
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/supplier.mtime' ) ); ?></span>
66
+					<?= $enc->html($this->translate('admin', 'Modified')); ?>:
67
+					<span class="meta-value"><?= $enc->html($this->get('itemData/supplier.mtime')); ?></span>
68 68
 				</small>
69 69
 				<small>
70
-					<?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>:
71
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/supplier.ctime' ) ); ?></span>
70
+					<?= $enc->html($this->translate('admin', 'Created')); ?>:
71
+					<span class="meta-value"><?= $enc->html($this->get('itemData/supplier.ctime')); ?></span>
72 72
 				</small>
73 73
 				<small>
74
-					<?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>:
75
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/supplier.editor' ) ); ?></span>
74
+					<?= $enc->html($this->translate('admin', 'Editor')); ?>:
75
+					<span class="meta-value"><?= $enc->html($this->get('itemData/supplier.editor')); ?></span>
76 76
 				</small>
77 77
 			</div>
78 78
 		</div>
79 79
 
80 80
 		<div class="col-md-9 item-content tab-content">
81
-			<?php $readonly = ( $this->access( 'admin' ) === false ? $this->site()->readonly( $this->get( 'itemData/supplier.siteid' ) ) : '' ); ?>
81
+			<?php $readonly = ($this->access('admin') === false ? $this->site()->readonly($this->get('itemData/supplier.siteid')) : ''); ?>
82 82
 
83 83
 			<div id="basic" class="row item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic">
84 84
 
85 85
 				<div class="col-xl-6 content-block <?= $readonly ?>">
86 86
 					<div class="form-group row mandatory">
87
-						<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label>
87
+						<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label>
88 88
 						<div class="col-sm-8">
89 89
 							<select class="form-control custom-select item-status" required="required" tabindex="1"
90
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'supplier.status' ) ) ); ?>"
91
-								<?= $this->site()->readonly( $this->get( 'itemData/supplier.siteid' ) ); ?> >
90
+								name="<?= $enc->attr($this->formparam(array('item', 'supplier.status'))); ?>"
91
+								<?= $this->site()->readonly($this->get('itemData/supplier.siteid')); ?> >
92 92
 								<option value="">
93
-									<?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?>
93
+									<?= $enc->attr($this->translate('admin', 'Please select')); ?>
94 94
 								</option>
95
-								<option value="1" <?= $selected( $this->get( 'itemData/supplier.status', 1 ), 1 ); ?> >
96
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?>
95
+								<option value="1" <?= $selected($this->get('itemData/supplier.status', 1), 1); ?> >
96
+									<?= $enc->html($this->translate('mshop/code', 'status:1')); ?>
97 97
 								</option>
98
-								<option value="0" <?= $selected( $this->get( 'itemData/supplier.status', 1 ), 0 ); ?> >
99
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?>
98
+								<option value="0" <?= $selected($this->get('itemData/supplier.status', 1), 0); ?> >
99
+									<?= $enc->html($this->translate('mshop/code', 'status:0')); ?>
100 100
 								</option>
101
-								<option value="-1" <?= $selected( $this->get( 'itemData/supplier.status', 1 ), -1 ); ?> >
102
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?>
101
+								<option value="-1" <?= $selected($this->get('itemData/supplier.status', 1), -1); ?> >
102
+									<?= $enc->html($this->translate('mshop/code', 'status:-1')); ?>
103 103
 								</option>
104
-								<option value="-2" <?= $selected( $this->get( 'itemData/supplier.status', 1 ), -2 ); ?> >
105
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?>
104
+								<option value="-2" <?= $selected($this->get('itemData/supplier.status', 1), -2); ?> >
105
+									<?= $enc->html($this->translate('mshop/code', 'status:-2')); ?>
106 106
 								</option>
107 107
 							</select>
108 108
 						</div>
109 109
 					</div>
110 110
 					<div class="form-group row mandatory">
111
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Code' ) ); ?></label>
111
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Code')); ?></label>
112 112
 						<div class="col-sm-8">
113 113
 							<input class="form-control item-code" required="required" tabindex="1" autocomplete="off"
114
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'supplier.code' ) ) ); ?>"
115
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Unique code (required)' ) ); ?>"
116
-								value="<?= $enc->attr( $this->get( 'itemData/supplier.code' ) ); ?>"
117
-								<?= $this->site()->readonly( $this->get( 'itemData/supplier.siteid' ) ); ?> />
114
+								name="<?= $enc->attr($this->formparam(array('item', 'supplier.code'))); ?>"
115
+								placeholder="<?= $enc->attr($this->translate('admin', 'Unique code (required)')); ?>"
116
+								value="<?= $enc->attr($this->get('itemData/supplier.code')); ?>"
117
+								<?= $this->site()->readonly($this->get('itemData/supplier.siteid')); ?> />
118 118
 						</div>
119 119
 						<div class="col-sm-12 form-text text-muted help-text">
120
-							<?= $enc->html( $this->translate( 'admin', 'Unique supplier code' ) ); ?>
120
+							<?= $enc->html($this->translate('admin', 'Unique supplier code')); ?>
121 121
 						</div>
122 122
 					</div>
123 123
 					<div class="form-group row mandatory">
124
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label>
124
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label>
125 125
 						<div class="col-sm-8">
126 126
 							<input class="form-control item-label" required="required" tabindex="1" autocomplete="off"
127
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'supplier.label' ) ) ); ?>"
128
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Label (required)' ) ); ?>"
129
-								value="<?= $enc->attr( $this->get( 'itemData/supplier.label' ) ); ?>"
130
-								<?= $this->site()->readonly( $this->get( 'itemData/supplier.siteid' ) ); ?> />
127
+								name="<?= $enc->attr($this->formparam(array('item', 'supplier.label'))); ?>"
128
+								placeholder="<?= $enc->attr($this->translate('admin', 'Label (required)')); ?>"
129
+								value="<?= $enc->attr($this->get('itemData/supplier.label')); ?>"
130
+								<?= $this->site()->readonly($this->get('itemData/supplier.siteid')); ?> />
131 131
 						</div>
132 132
 						<div class="col-sm-12 form-text text-muted help-text">
133
-							<?= $enc->html( $this->translate( 'admin', 'Supplier name or company' ) ); ?>
133
+							<?= $enc->html($this->translate('admin', 'Supplier name or company')); ?>
134 134
 						</div>
135 135
 					</div>
136 136
 				</div>
137 137
 			</div>
138 138
 
139
-			<?= $this->get( 'itemBody' ); ?>
139
+			<?= $this->get('itemBody'); ?>
140 140
 
141 141
 		</div>
142 142
 
143 143
 		<div class="item-actions">
144
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
144
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
145 145
 		</div>
146 146
 	</div>
147 147
 </form>
@@ -149,4 +149,4 @@  discard block
 block discarded – undo
149 149
 <?php $this->block()->stop(); ?>
150 150
 
151 151
 
152
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
152
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/supplier/list-standard.php 1 patch
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@  discard block
 block discarded – undo
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/supplier/fields
@@ -49,38 +49,38 @@  discard block
 block discarded – undo
49 49
  * @category Developer
50 50
  */
51 51
 $default = ['supplier.status', 'supplier.code', 'supplier.label'];
52
-$default = $this->config( 'admin/jqadm/supplier/fields', $default );
53
-$fields = $this->session( 'aimeos/admin/jqadm/supplier/fields', $default );
52
+$default = $this->config('admin/jqadm/supplier/fields', $default);
53
+$fields = $this->session('aimeos/admin/jqadm/supplier/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
 $columnList = [
59
-	'supplier.id' => $this->translate( 'admin', 'ID' ),
60
-	'supplier.status' => $this->translate( 'admin', 'Status' ),
61
-	'supplier.code' => $this->translate( 'admin', 'Code' ),
62
-	'supplier.label' => $this->translate( 'admin', 'Label' ),
63
-	'supplier.ctime' => $this->translate( 'admin', 'Created' ),
64
-	'supplier.mtime' => $this->translate( 'admin', 'Modified' ),
65
-	'supplier.editor' => $this->translate( 'admin', 'Editor' ),
59
+	'supplier.id' => $this->translate('admin', 'ID'),
60
+	'supplier.status' => $this->translate('admin', 'Status'),
61
+	'supplier.code' => $this->translate('admin', 'Code'),
62
+	'supplier.label' => $this->translate('admin', 'Label'),
63
+	'supplier.ctime' => $this->translate('admin', 'Created'),
64
+	'supplier.mtime' => $this->translate('admin', 'Modified'),
65
+	'supplier.editor' => $this->translate('admin', 'Editor'),
66 66
 ];
67 67
 
68 68
 
69 69
 ?>
70
-<?php $this->block()->start( 'jqadm_content' ); ?>
70
+<?php $this->block()->start('jqadm_content'); ?>
71 71
 
72 72
 <nav class="main-navbar">
73 73
 
74 74
 	<span class="navbar-brand">
75
-		<?= $enc->html( $this->translate( 'admin', 'Supplier' ) ); ?>
76
-		<span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span>
75
+		<?= $enc->html($this->translate('admin', 'Supplier')); ?>
76
+		<span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span>
77 77
 	</span>
78 78
 
79 79
 	<?= $this->partial(
80
-		$this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [
81
-			'filter' => $this->session( 'aimeos/admin/jqadm/supplier/filter', [] ),
82
-			'filterAttributes' => $this->get( 'filterAttributes', [] ),
83
-			'filterOperators' => $this->get( 'filterOperators', [] ),
80
+		$this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [
81
+			'filter' => $this->session('aimeos/admin/jqadm/supplier/filter', []),
82
+			'filterAttributes' => $this->get('filterAttributes', []),
83
+			'filterOperators' => $this->get('filterOperators', []),
84 84
 			'params' => $params,
85 85
 		]
86 86
 	); ?>
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 
89 89
 
90 90
 <?= $this->partial(
91
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
92
-		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ),
93
-		'page' => $this->session( 'aimeos/admin/jqadm/supplier/page', [] )]
91
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
92
+		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'),
93
+		'page' => $this->session('aimeos/admin/jqadm/supplier/page', [])]
94 94
 	);
95 95
 ?>
96 96
 
97
-<form class="list list-supplier" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>">
97
+<form class="list list-supplier" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>">
98 98
 	<?= $this->csrf()->formfield(); ?>
99 99
 
100 100
 	<table class="list-items table table-hover table-striped">
@@ -102,20 +102,20 @@  discard block
 block discarded – undo
102 102
 			<tr>
103 103
 
104 104
 				<?= $this->partial(
105
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
106
-						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/supplier/sort' )]
105
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
106
+						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/supplier/sort')]
107 107
 					);
108 108
 				?>
109 109
 
110 110
 				<th class="actions">
111 111
 					<a class="btn fa act-add" tabindex="1"
112
-						href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>"
113
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
114
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>">
112
+						href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>"
113
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
114
+						aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>">
115 115
 					</a>
116 116
 
117 117
 					<?= $this->partial(
118
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
118
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
119 119
 							['fields' => $fields, 'data' => $columnList]
120 120
 						);
121 121
 					?>
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
 		<tbody>
126 126
 
127 127
 			<?= $this->partial(
128
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
129
-					'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/supplier/filter', [] ),
128
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
129
+					'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/supplier/filter', []),
130 130
 					'data' => [
131 131
 						'supplier.id' => ['op' => '=='],
132 132
 						'supplier.status' => ['op' => '==', 'type' => 'select', 'val' => [
133
-							'1' => $this->translate( 'mshop/code', 'status:1' ),
134
-							'0' => $this->translate( 'mshop/code', 'status:0' ),
135
-							'-1' => $this->translate( 'mshop/code', 'status:-1' ),
136
-							'-2' => $this->translate( 'mshop/code', 'status:-2' ),
133
+							'1' => $this->translate('mshop/code', 'status:1'),
134
+							'0' => $this->translate('mshop/code', 'status:0'),
135
+							'-1' => $this->translate('mshop/code', 'status:-1'),
136
+							'-2' => $this->translate('mshop/code', 'status:-2'),
137 137
 						]],
138 138
 						'supplier.code' => [],
139 139
 						'supplier.label' => [],
@@ -144,41 +144,41 @@  discard block
 block discarded – undo
144 144
 				] );
145 145
 			?>
146 146
 
147
-			<?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?>
148
-				<?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?>
149
-				<tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>">
150
-					<?php if( in_array( 'supplier.id', $fields ) ) : ?>
151
-						<td class="supplier-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td>
147
+			<?php foreach ($this->get('items', []) as $id => $item) : ?>
148
+				<?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?>
149
+				<tr class="<?= $this->site()->readonly($item->getSiteId()); ?>">
150
+					<?php if (in_array('supplier.id', $fields)) : ?>
151
+						<td class="supplier-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td>
152 152
 					<?php endif; ?>
153
-					<?php if( in_array( 'supplier.status', $fields ) ) : ?>
154
-						<td class="supplier-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td>
153
+					<?php if (in_array('supplier.status', $fields)) : ?>
154
+						<td class="supplier-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td>
155 155
 					<?php endif; ?>
156
-					<?php if( in_array( 'supplier.code', $fields ) ) : ?>
157
-						<td class="supplier-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td>
156
+					<?php if (in_array('supplier.code', $fields)) : ?>
157
+						<td class="supplier-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td>
158 158
 					<?php endif; ?>
159
-					<?php if( in_array( 'supplier.label', $fields ) ) : ?>
160
-						<td class="supplier-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td>
159
+					<?php if (in_array('supplier.label', $fields)) : ?>
160
+						<td class="supplier-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td>
161 161
 					<?php endif; ?>
162
-					<?php if( in_array( 'supplier.ctime', $fields ) ) : ?>
163
-						<td class="supplier-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td>
162
+					<?php if (in_array('supplier.ctime', $fields)) : ?>
163
+						<td class="supplier-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td>
164 164
 					<?php endif; ?>
165
-					<?php if( in_array( 'supplier.mtime', $fields ) ) : ?>
166
-						<td class="supplier-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td>
165
+					<?php if (in_array('supplier.mtime', $fields)) : ?>
166
+						<td class="supplier-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td>
167 167
 					<?php endif; ?>
168
-					<?php if( in_array( 'supplier.editor', $fields ) ) : ?>
169
-						<td class="supplier-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td>
168
+					<?php if (in_array('supplier.editor', $fields)) : ?>
169
+						<td class="supplier-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td>
170 170
 					<?php endif; ?>
171 171
 
172 172
 					<td class="actions">
173 173
 						<a class="btn act-copy fa" tabindex="1"
174
-							href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>"
175
-							title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>"
176
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a>
177
-						<?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?>
174
+							href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>"
175
+							title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>"
176
+							aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a>
177
+						<?php if (!$this->site()->readonly($item->getSiteId())) : ?>
178 178
 							<a class="btn act-delete fa" tabindex="1"
179
-								href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'supplier', 'id' => $id] + $params, [], $delConfig ) ); ?>"
180
-								title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
181
-								aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a>
179
+								href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'supplier', 'id' => $id] + $params, [], $delConfig)); ?>"
180
+								title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
181
+								aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a>
182 182
 						<?php endif; ?>
183 183
 					</td>
184 184
 				</tr>
@@ -186,18 +186,18 @@  discard block
 block discarded – undo
186 186
 		</tbody>
187 187
 	</table>
188 188
 
189
-	<?php if( $this->get( 'items', [] ) === [] ) : ?>
190
-		<div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div>
189
+	<?php if ($this->get('items', []) === []) : ?>
190
+		<div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div>
191 191
 	<?php endif; ?>
192 192
 </form>
193 193
 
194 194
 <?= $this->partial(
195
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
196
-		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ),
197
-		'page' => $this->session( 'aimeos/admin/jqadm/supplier/page', [] )]
195
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
196
+		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'),
197
+		'page' => $this->session('aimeos/admin/jqadm/supplier/page', [])]
198 198
 	);
199 199
 ?>
200 200
 
201 201
 <?php $this->block()->stop(); ?>
202 202
 
203
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
203
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/subscription/item-standard.php 1 patch
Spacing   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -5,21 +5,21 @@  discard block
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2018
6 6
  */
7 7
 
8
-$selected = function( $key, $code ) {
9
-	return ( $key === $code ? 'selected="selected"' : '' );
8
+$selected = function($key, $code) {
9
+	return ($key === $code ? 'selected="selected"' : '');
10 10
 };
11 11
 
12 12
 
13
-$sortItems = function( array $items )
13
+$sortItems = function(array $items)
14 14
 {
15 15
 	$result = [];
16 16
 
17
-	if( isset( $items['payment'] ) ) {
18
-		$result['payment'] = $items['payment']; unset( $items['payment'] );
17
+	if (isset($items['payment'])) {
18
+		$result['payment'] = $items['payment']; unset($items['payment']);
19 19
 	}
20 20
 
21
-	if( isset( $items['delivery'] ) ) {
22
-		$result['delivery'] = $items['delivery']; unset( $items['delivery'] );
21
+	if (isset($items['delivery'])) {
22
+		$result['delivery'] = $items['delivery']; unset($items['delivery']);
23 23
 	}
24 24
 
25 25
 	return $result + $items;
@@ -28,42 +28,42 @@  discard block
 block discarded – undo
28 28
 
29 29
 $enc = $this->encoder();
30 30
 
31
-$target = $this->config( 'admin/jqadm/url/save/target' );
32
-$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' );
33
-$action = $this->config( 'admin/jqadm/url/save/action', 'save' );
34
-$config = $this->config( 'admin/jqadm/url/save/config', [] );
31
+$target = $this->config('admin/jqadm/url/save/target');
32
+$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm');
33
+$action = $this->config('admin/jqadm/url/save/action', 'save');
34
+$config = $this->config('admin/jqadm/url/save/config', []);
35 35
 
36
-$getTarget = $this->config( 'admin/jqadm/url/get/target' );
37
-$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
38
-$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' );
39
-$getConfig = $this->config( 'admin/jqadm/url/get/config', [] );
36
+$getTarget = $this->config('admin/jqadm/url/get/target');
37
+$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm');
38
+$getAction = $this->config('admin/jqadm/url/get/action', 'get');
39
+$getConfig = $this->config('admin/jqadm/url/get/config', []);
40 40
 
41
-$params = $this->get( 'pageParams', [] );
41
+$params = $this->get('pageParams', []);
42 42
 $basket = $this->itemBase;
43 43
 
44 44
 /// Price format with price value (%1$s) and currency (%2$s)
45
-$priceFormat = $this->translate( 'client/code', '%1$s %2$s' );
46
-$currency = $this->translate( 'currency', $basket->getPrice()->getCurrencyId() );
45
+$priceFormat = $this->translate('client/code', '%1$s %2$s');
46
+$currency = $this->translate('currency', $basket->getPrice()->getCurrencyId());
47 47
 
48 48
 
49 49
 ?>
50
-<?php $this->block()->start( 'jqadm_content' ); ?>
50
+<?php $this->block()->start('jqadm_content'); ?>
51 51
 
52
-<form class="item item-subscription form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>">
53
-	<input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.id' ) ) ); ?>" value="<?= $enc->attr( $this->get( 'itemData/subscription.id' ) ); ?>" />
54
-	<input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" />
52
+<form class="item item-subscription form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>">
53
+	<input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'subscription.id'))); ?>" value="<?= $enc->attr($this->get('itemData/subscription.id')); ?>" />
54
+	<input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" />
55 55
 	<?= $this->csrf()->formfield(); ?>
56 56
 
57 57
 	<nav class="main-navbar">
58 58
 		<span class="navbar-brand">
59
-			<?= $enc->html( $this->translate( 'admin', 'Subscription' ) ); ?>:
60
-			<?= $enc->html( $this->get( 'itemData/subscription.id' ) ); ?> -
61
-			<?= $enc->html( $this->get( 'itemData/subscription.datenext', $this->translate( 'admin', 'New' ) ) ); ?>
62
-			<?= $enc->html( $this->get( 'itemData/subscription.interval' ) ); ?>
63
-			<span class="navbar-secondary">(<?= $enc->html( $this->site()->match( $this->get( 'itemData/subscription.siteid' ) ) ); ?>)</span>
59
+			<?= $enc->html($this->translate('admin', 'Subscription')); ?>:
60
+			<?= $enc->html($this->get('itemData/subscription.id')); ?> -
61
+			<?= $enc->html($this->get('itemData/subscription.datenext', $this->translate('admin', 'New'))); ?>
62
+			<?= $enc->html($this->get('itemData/subscription.interval')); ?>
63
+			<span class="navbar-secondary">(<?= $enc->html($this->site()->match($this->get('itemData/subscription.siteid'))); ?>)</span>
64 64
 		</span>
65 65
 		<div class="item-actions">
66
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
66
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
67 67
 		</div>
68 68
 	</nav>
69 69
 
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
 				<li class="nav-item basic">
76 76
 					<a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic">
77
-						<?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?>
77
+						<?= $enc->html($this->translate('admin', 'Basic')); ?>
78 78
 					</a>
79 79
 				</li>
80 80
 
81
-				<?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?>
82
-					<li class="nav-item <?= $enc->attr( $subpart ); ?>">
83
-						<a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx+1; ?>">
84
-							<?= $enc->html( $this->translate( 'admin', $subpart ) ); ?>
81
+				<?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?>
82
+					<li class="nav-item <?= $enc->attr($subpart); ?>">
83
+						<a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>">
84
+							<?= $enc->html($this->translate('admin', $subpart)); ?>
85 85
 						</a>
86 86
 					</li>
87 87
 				<?php endforeach; ?>
@@ -90,163 +90,163 @@  discard block
 block discarded – undo
90 90
 
91 91
 			<div class="item-meta text-muted">
92 92
 				<small>
93
-					<?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>:
94
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/subscription.mtime' ) ); ?></span>
93
+					<?= $enc->html($this->translate('admin', 'Modified')); ?>:
94
+					<span class="meta-value"><?= $enc->html($this->get('itemData/subscription.mtime')); ?></span>
95 95
 				</small>
96 96
 				<small>
97
-					<?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>:
98
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/subscription.ctime' ) ); ?></span>
97
+					<?= $enc->html($this->translate('admin', 'Created')); ?>:
98
+					<span class="meta-value"><?= $enc->html($this->get('itemData/subscription.ctime')); ?></span>
99 99
 				</small>
100 100
 				<small>
101
-					<?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>:
102
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/subscription.editor' ) ); ?></span>
101
+					<?= $enc->html($this->translate('admin', 'Editor')); ?>:
102
+					<span class="meta-value"><?= $enc->html($this->get('itemData/subscription.editor')); ?></span>
103 103
 				</small>
104 104
 			</div>
105 105
 		</div>
106 106
 
107 107
 		<div class="col-md-9 item-content tab-content">
108
-			<?php $readonly = ( $this->access( 'admin' ) === false ? $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ) : '' ); ?>
108
+			<?php $readonly = ($this->access('admin') === false ? $this->site()->readonly($this->get('itemData/subscription.siteid')) : ''); ?>
109 109
 
110 110
 			<div id="basic" class="item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic">
111 111
 
112 112
 				<div class="row">
113 113
 
114
-					<input class="item-ordbaseid" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.ordbaseid' ) ) ); ?>"
115
-						value="<?= $enc->attr( $this->param( 'subscription.ordbaseid', $this->get( 'itemData/subscription.ordbaseid' ) ) ); ?>" />
116
-					<input class="item-ordprodid" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.ordprodid' ) ) ); ?>"
117
-						value="<?= $enc->attr( $this->param( 'subscription.ordprodid', $this->get( 'itemData/subscription.ordprodid' ) ) ); ?>" />
114
+					<input class="item-ordbaseid" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'subscription.ordbaseid'))); ?>"
115
+						value="<?= $enc->attr($this->param('subscription.ordbaseid', $this->get('itemData/subscription.ordbaseid'))); ?>" />
116
+					<input class="item-ordprodid" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'subscription.ordprodid'))); ?>"
117
+						value="<?= $enc->attr($this->param('subscription.ordprodid', $this->get('itemData/subscription.ordprodid'))); ?>" />
118 118
 
119 119
 					<div class="col-xl-6 content-block <?= $readonly ?>">
120 120
 						<div class="form-group row mandatory">
121
-							<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label>
121
+							<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label>
122 122
 							<div class="col-sm-8">
123 123
 								<select class="form-control custom-select item-status" required="required" tabindex="1"
124
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.status' ) ) ); ?>"
125
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> >
124
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.status'))); ?>"
125
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> >
126 126
 									<option value="">
127
-										<?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?>
127
+										<?= $enc->attr($this->translate('admin', 'Please select')); ?>
128 128
 									</option>
129
-									<option value="1" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), 1 ); ?> >
130
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?>
129
+									<option value="1" <?= $selected($this->get('itemData/subscription.status', 1), 1); ?> >
130
+										<?= $enc->html($this->translate('mshop/code', 'status:1')); ?>
131 131
 									</option>
132
-									<option value="0" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), 0 ); ?> >
133
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?>
132
+									<option value="0" <?= $selected($this->get('itemData/subscription.status', 1), 0); ?> >
133
+										<?= $enc->html($this->translate('mshop/code', 'status:0')); ?>
134 134
 									</option>
135
-									<option value="-1" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), -1 ); ?> >
136
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?>
135
+									<option value="-1" <?= $selected($this->get('itemData/subscription.status', 1), -1); ?> >
136
+										<?= $enc->html($this->translate('mshop/code', 'status:-1')); ?>
137 137
 									</option>
138
-									<option value="-2" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), -2 ); ?> >
139
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?>
138
+									<option value="-2" <?= $selected($this->get('itemData/subscription.status', 1), -2); ?> >
139
+										<?= $enc->html($this->translate('mshop/code', 'status:-2')); ?>
140 140
 									</option>
141 141
 								</select>
142 142
 							</div>
143 143
 						</div>
144 144
 						<div class="form-group row mandatory">
145
-							<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Interval' ) ); ?></label>
145
+							<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Interval')); ?></label>
146 146
 							<div class="col-sm-8">
147 147
 								<input class="form-control item-interval" type="text" required="required" tabindex="1"
148
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.interval' ) ) ); ?>"
149
-									placeholder="<?= $enc->attr( $this->translate( 'admin', 'Interval (required)' ) ); ?>"
150
-									value="<?= $enc->attr( $this->get( 'itemData/subscription.interval', 'P1Y0M0W0D' ) ); ?>"
151
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> />
148
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.interval'))); ?>"
149
+									placeholder="<?= $enc->attr($this->translate('admin', 'Interval (required)')); ?>"
150
+									value="<?= $enc->attr($this->get('itemData/subscription.interval', 'P1Y0M0W0D')); ?>"
151
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> />
152 152
 							</div>
153 153
 							<div class="col-sm-12 form-text text-muted help-text">
154
-								<?= $enc->html( $this->translate( 'admin', 'Subscription interval with years, months, weeks and days, e.g. "P0Y1M2W3D" for zero years, one month, two weeks and three days' ) ); ?>
154
+								<?= $enc->html($this->translate('admin', 'Subscription interval with years, months, weeks and days, e.g. "P0Y1M2W3D" for zero years, one month, two weeks and three days')); ?>
155 155
 							</div>
156 156
 						</div>
157 157
 						<div class="form-group row mandatory">
158
-							<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Next date' ) ); ?></label>
158
+							<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Next date')); ?></label>
159 159
 							<div class="col-sm-8">
160 160
 								<input class="form-control item-datenext" type="date" required="required" tabindex="1"
161
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.datenext' ) ) ); ?>"
162
-									placeholder="<?= $enc->attr( $this->translate( 'admin', 'Next date (optional)' ) ); ?>"
163
-									value="<?= $enc->attr( $this->get( 'itemData/subscription.datenext' ) ); ?>"
164
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> />
161
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.datenext'))); ?>"
162
+									placeholder="<?= $enc->attr($this->translate('admin', 'Next date (optional)')); ?>"
163
+									value="<?= $enc->attr($this->get('itemData/subscription.datenext')); ?>"
164
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> />
165 165
 							</div>
166 166
 							<div class="col-sm-12 form-text text-muted help-text">
167
-								<?= $enc->html( $this->translate( 'admin', 'Next date the subscription is renewed' ) ); ?>
167
+								<?= $enc->html($this->translate('admin', 'Next date the subscription is renewed')); ?>
168 168
 							</div>
169 169
 						</div>
170 170
 						<div class="form-group row optional">
171
-							<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label>
171
+							<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label>
172 172
 							<div class="col-sm-8">
173 173
 								<input class="form-control item-dateendend" type="date" tabindex="1"
174
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.dateend' ) ) ); ?>"
175
-									placeholder="<?= $enc->attr( $this->translate( 'admin', 'End date (optional)' ) ); ?>"
176
-									value="<?= $enc->attr( $this->get( 'itemData/subscription.dateend' ) ); ?>"
177
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> />
174
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.dateend'))); ?>"
175
+									placeholder="<?= $enc->attr($this->translate('admin', 'End date (optional)')); ?>"
176
+									value="<?= $enc->attr($this->get('itemData/subscription.dateend')); ?>"
177
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> />
178 178
 							</div>
179 179
 							<div class="col-sm-12 form-text text-muted help-text">
180
-								<?= $enc->html( $this->translate( 'admin', 'Date the subscription ends' ) ); ?>
180
+								<?= $enc->html($this->translate('admin', 'Date the subscription ends')); ?>
181 181
 							</div>
182 182
 						</div>
183 183
 						<div class="form-group row optional">
184
-							<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Reason' ) ); ?></label>
184
+							<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Reason')); ?></label>
185 185
 							<div class="col-sm-8">
186 186
 								<select class="form-control custom-select item-reason" tabindex="1"
187
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.reason' ) ) ); ?>"
188
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> >
187
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.reason'))); ?>"
188
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> >
189 189
 									<option value="">
190
-										<?= $enc->attr( $this->translate( 'admin', 'None' ) ); ?>
190
+										<?= $enc->attr($this->translate('admin', 'None')); ?>
191 191
 									</option>
192
-									<option value="1" <?= $selected( $this->get( 'itemData/subscription.reason' ), 1 ); ?> >
193
-										<?= $enc->html( $this->translate( 'mshop/code', 'reason:1' ) ); ?>
192
+									<option value="1" <?= $selected($this->get('itemData/subscription.reason'), 1); ?> >
193
+										<?= $enc->html($this->translate('mshop/code', 'reason:1')); ?>
194 194
 									</option>
195
-									<option value="0" <?= $selected( $this->get( 'itemData/subscription.reason' ), 0 ); ?> >
196
-										<?= $enc->html( $this->translate( 'mshop/code', 'reason:0' ) ); ?>
195
+									<option value="0" <?= $selected($this->get('itemData/subscription.reason'), 0); ?> >
196
+										<?= $enc->html($this->translate('mshop/code', 'reason:0')); ?>
197 197
 									</option>
198
-									<option value="-1" <?= $selected( $this->get( 'itemData/subscription.reason' ), -1 ); ?> >
199
-										<?= $enc->html( $this->translate( 'mshop/code', 'reason:-1' ) ); ?>
198
+									<option value="-1" <?= $selected($this->get('itemData/subscription.reason'), -1); ?> >
199
+										<?= $enc->html($this->translate('mshop/code', 'reason:-1')); ?>
200 200
 									</option>
201 201
 								</select>
202 202
 							</div>
203 203
 						</div>
204 204
 					</div>
205 205
 
206
-					<div class="col-xl-6 content-block <?= $this->site()->readonly( $basket->getLocale()->getSiteId() ); ?>">
206
+					<div class="col-xl-6 content-block <?= $this->site()->readonly($basket->getLocale()->getSiteId()); ?>">
207 207
 						<div class="form-group row">
208
-							<label class="col-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Site' ) ); ?></label>
208
+							<label class="col-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Site')); ?></label>
209 209
 							<div class="col-8">
210
-								<span class="form-control item-sitecode"><?= $enc->html( $basket->getSiteCode() ); ?></span>
210
+								<span class="form-control item-sitecode"><?= $enc->html($basket->getSiteCode()); ?></span>
211 211
 							</div>
212 212
 							<div class="col-12 form-text text-muted help-text">
213
-								<?= $enc->html( $this->translate( 'admin', 'Site the order was placed at' ) ); ?>
213
+								<?= $enc->html($this->translate('admin', 'Site the order was placed at')); ?>
214 214
 							</div>
215 215
 						</div>
216 216
 						<div class="form-group row">
217
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Customer ID' ) ); ?></label>
217
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Customer ID')); ?></label>
218 218
 							<div class="col-8">
219 219
 								<span class="form-control item-customerid">
220
-									<?php if( $basket->getCustomerId() ) : ?>
220
+									<?php if ($basket->getCustomerId()) : ?>
221 221
 										<a class="act-view" target="_blank"
222
-											href="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'customer', 'id' => $basket->getCustomerId()], [], $getConfig ) ); ?>">
223
-											<?= $enc->attr( $basket->getCustomerId() ); ?>
222
+											href="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'customer', 'id' => $basket->getCustomerId()], [], $getConfig)); ?>">
223
+											<?= $enc->attr($basket->getCustomerId()); ?>
224 224
 										</a>
225 225
 									<?php endif; ?>
226 226
 								</span>
227 227
 							</div>
228 228
 						</div>
229 229
 						<div class="form-group row">
230
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Order ID' ) ); ?></label>
230
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Order ID')); ?></label>
231 231
 							<div class="col-8">
232 232
 								<span class="form-control item-orderid">
233 233
 									<a class="act-view" target="_blank"
234
-										href="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'order', 'id' => $basket->getId()], [], $getConfig ) ); ?>">
235
-										<?= $enc->attr( $basket->getId() ); ?>
234
+										href="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'order', 'id' => $basket->getId()], [], $getConfig)); ?>">
235
+										<?= $enc->attr($basket->getId()); ?>
236 236
 									</a>
237 237
 								</span>
238 238
 							</div>
239 239
 						</div>
240 240
 						<div class="form-group row">
241
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Currency' ) ); ?></label>
241
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Currency')); ?></label>
242 242
 							<div class="col-8">
243
-								<span class="form-control item-currencyid"><?= $enc->html( $basket->getLocale()->getCurrencyId() ); ?></span>
243
+								<span class="form-control item-currencyid"><?= $enc->html($basket->getLocale()->getCurrencyId()); ?></span>
244 244
 							</div>
245 245
 						</div>
246 246
 						<div class="form-group row">
247
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></label>
247
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Language')); ?></label>
248 248
 							<div class="col-8">
249
-								<span class="form-control item-languageid"><?= $enc->html( $this->translate( 'language', $basket->getLocale()->getLanguageId() ) ); ?></span>
249
+								<span class="form-control item-languageid"><?= $enc->html($this->translate('language', $basket->getLocale()->getLanguageId())); ?></span>
250 250
 							</div>
251 251
 						</div>
252 252
 					</div>
@@ -254,48 +254,48 @@  discard block
 block discarded – undo
254 254
 
255 255
 				<div class="row item-product">
256 256
 					<div class="col-sm-12 content-block">
257
-						<h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin', 'Product' ) ); ?></h2>
257
+						<h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin', 'Product')); ?></h2>
258 258
 						<table class="item-product-list table table-striped">
259 259
 							<thead>
260 260
 								<tr>
261
-									<th class="item-column column-desc"><?= $enc->html( $this->translate( 'admin', 'Name' ) ); ?></th>
262
-									<th class="item-column column-quantity"><?= $enc->html( $this->translate( 'admin', 'Quantity' ) ); ?></th>
263
-									<th class="item-column column-price"><?= $enc->html( $this->translate( 'admin', 'Price' ) ); ?></th>
264
-									<th class="item-column column-sum"><?= $enc->html( $this->translate( 'admin', 'Sum' ) ); ?></th>
261
+									<th class="item-column column-desc"><?= $enc->html($this->translate('admin', 'Name')); ?></th>
262
+									<th class="item-column column-quantity"><?= $enc->html($this->translate('admin', 'Quantity')); ?></th>
263
+									<th class="item-column column-price"><?= $enc->html($this->translate('admin', 'Price')); ?></th>
264
+									<th class="item-column column-sum"><?= $enc->html($this->translate('admin', 'Sum')); ?></th>
265 265
 								</tr>
266 266
 							</thead>
267 267
 							<tbody>
268 268
 
269
-								<?php foreach( (array) $basket->getProducts() as $pos => $orderProduct ) : ?>
270
-									<?php if( $orderProduct->getId() == $this->param( 'subscription.ordprodid', $this->get( 'itemData/subscription.ordprodid' ) ) ) : ?>
269
+								<?php foreach ((array) $basket->getProducts() as $pos => $orderProduct) : ?>
270
+									<?php if ($orderProduct->getId() == $this->param('subscription.ordprodid', $this->get('itemData/subscription.ordprodid'))) : ?>
271 271
 										<tr class="list-item">
272 272
 											<td class="item-column column-desc">
273
-												<span class="product-name"><?= $enc->html( $orderProduct->getName() ); ?></span>
273
+												<span class="product-name"><?= $enc->html($orderProduct->getName()); ?></span>
274 274
 												<span class="product-attr">
275
-													<?php foreach( $orderProduct->getAttributeItems() as $attrItem ) : ?>
276
-														<span class="attr-code"><?= $enc->html( $attrItem->getCode() ); ?></span>
275
+													<?php foreach ($orderProduct->getAttributeItems() as $attrItem) : ?>
276
+														<span class="attr-code"><?= $enc->html($attrItem->getCode()); ?></span>
277 277
 														<span class="attr-value">
278
-															<?php if( $attrItem->getQuantity() > 1 ) : ?>
279
-																<?= $enc->html( $attrItem->getQuantity() ); ?>×
278
+															<?php if ($attrItem->getQuantity() > 1) : ?>
279
+																<?= $enc->html($attrItem->getQuantity()); ?>×
280 280
 															<?php endif; ?>
281
-															<?= $enc->html( $attrItem->getValue() ); ?>
281
+															<?= $enc->html($attrItem->getValue()); ?>
282 282
 														</span>
283 283
 													<?php endforeach; ?>
284 284
 												</span>
285
-												<span class="product-sku"><?= $enc->html( $orderProduct->getProductCode() ); ?></span>
285
+												<span class="product-sku"><?= $enc->html($orderProduct->getProductCode()); ?></span>
286 286
 											</td>
287 287
 											<td class="item-column column-quantity">
288
-												<span class="product-quantity"><?= $enc->html( $orderProduct->getQuantity() ); ?></span>
288
+												<span class="product-quantity"><?= $enc->html($orderProduct->getQuantity()); ?></span>
289 289
 											</td>
290 290
 											<td class="item-column column-price">
291
-												<span class="product-price"><?= $enc->html( sprintf( $priceFormat, $orderProduct->getPrice()->getValue(), $currency ) ); ?></span>
292
-												<span class="product-costs"><?= $enc->html( sprintf( $priceFormat, $orderProduct->getPrice()->getCosts(), $currency ) ); ?></span>
293
-												<span class="product-rebate"><?= $enc->html( sprintf( $priceFormat, $orderProduct->getPrice()->getRebate(), $currency ) ); ?></span>
291
+												<span class="product-price"><?= $enc->html(sprintf($priceFormat, $orderProduct->getPrice()->getValue(), $currency)); ?></span>
292
+												<span class="product-costs"><?= $enc->html(sprintf($priceFormat, $orderProduct->getPrice()->getCosts(), $currency)); ?></span>
293
+												<span class="product-rebate"><?= $enc->html(sprintf($priceFormat, $orderProduct->getPrice()->getRebate(), $currency)); ?></span>
294 294
 											</td>
295 295
 											<td class="item-column column-sum">
296
-												<span class="product-price"><?= $enc->html( sprintf( $priceFormat, $this->number( $orderProduct->getPrice()->getValue() * $orderProduct->getQuantity() ), $currency ) ); ?></span>
297
-												<span class="product-costs"><?= $enc->html( sprintf( $priceFormat, $this->number( $orderProduct->getPrice()->getCosts() * $orderProduct->getQuantity() ), $currency ) ); ?></span>
298
-												<span class="product-rebate"><?= $enc->html( sprintf( $priceFormat, $this->number( $orderProduct->getPrice()->getRebate() * $orderProduct->getQuantity() ), $currency ) ); ?></span>
296
+												<span class="product-price"><?= $enc->html(sprintf($priceFormat, $this->number($orderProduct->getPrice()->getValue() * $orderProduct->getQuantity()), $currency)); ?></span>
297
+												<span class="product-costs"><?= $enc->html(sprintf($priceFormat, $this->number($orderProduct->getPrice()->getCosts() * $orderProduct->getQuantity()), $currency)); ?></span>
298
+												<span class="product-rebate"><?= $enc->html(sprintf($priceFormat, $this->number($orderProduct->getPrice()->getRebate() * $orderProduct->getQuantity()), $currency)); ?></span>
299 299
 											</td>
300 300
 										</tr>
301 301
 									<?php endif; ?>
@@ -307,10 +307,10 @@  discard block
 block discarded – undo
307 307
 				</div>
308 308
 
309 309
 				<div class="row">
310
-					<?php foreach( $sortItems( $basket->getAddresses() ) as $type => $addr ) : $code = 'address:' . $type; ?>
310
+					<?php foreach ($sortItems($basket->getAddresses()) as $type => $addr) : $code = 'address:' . $type; ?>
311 311
 
312 312
 						<div class="col-xl-6 content-block item-address">
313
-							<h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin/ext', $code ) ); ?></h2>
313
+							<h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin/ext', $code)); ?></h2>
314 314
 
315 315
 							<div class="address-short">
316 316
 								<span class="address-text">
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
 											\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS,
322 322
 										);
323 323
 
324
-										echo preg_replace( "/\n+/m", "<br/>", trim( $enc->html( sprintf(
324
+										echo preg_replace("/\n+/m", "<br/>", trim($enc->html(sprintf(
325 325
 											/// Address format with company (%1$s), salutation (%2$s), title (%3$s), first name (%4$s), last name (%5$s),
326 326
 											/// address part one (%6$s, e.g street), address part two (%7$s, e.g house number), address part three (%8$s, e.g additional information),
327 327
 											/// postal/zip code (%9$s), city (%10$s), state (%11$s), country (%12$s), language (%13$s),
328 328
 											/// e-mail (%14$s), phone (%15$s), facsimile/telefax (%16$s), web site (%17$s), vatid (%18$s)
329
-											$this->translate( 'client', '%1$s
329
+											$this->translate('client', '%1$s
330 330
 %2$s %3$s %4$s %5$s
331 331
 %6$s %7$s
332 332
 %8$s
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 '
343 343
 											),
344 344
 											$addr->getCompany(),
345
-											( in_array( $addr->getSalutation(), $salutations ) ? $this->translate( 'mshop/code', $addr->getSalutation() ) : '' ),
345
+											(in_array($addr->getSalutation(), $salutations) ? $this->translate('mshop/code', $addr->getSalutation()) : ''),
346 346
 											$addr->getTitle(),
347 347
 											$addr->getFirstName(),
348 348
 											$addr->getLastName(),
@@ -352,14 +352,14 @@  discard block
 block discarded – undo
352 352
 											$addr->getPostal(),
353 353
 											$addr->getCity(),
354 354
 											$addr->getState(),
355
-											$this->translate( 'country', $addr->getCountryId() ),
356
-											$this->translate( 'language', $addr->getLanguageId() ),
355
+											$this->translate('country', $addr->getCountryId()),
356
+											$this->translate('language', $addr->getLanguageId()),
357 357
 											$addr->getEmail(),
358 358
 											$addr->getTelephone(),
359 359
 											$addr->getTelefax(),
360 360
 											$addr->getWebsite(),
361 361
 											$addr->getVatID()
362
-										) ) ) );
362
+										))));
363 363
 									?>
364 364
 								</span>
365 365
 							</div>
@@ -368,12 +368,12 @@  discard block
 block discarded – undo
368 368
 				</div>
369 369
 			</div>
370 370
 
371
-			<?= $this->get( 'itemBody' ); ?>
371
+			<?= $this->get('itemBody'); ?>
372 372
 
373 373
 		</div>
374 374
 
375 375
 		<div class="item-actions">
376
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
376
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
377 377
 		</div>
378 378
 	</div>
379 379
 </form>
@@ -381,4 +381,4 @@  discard block
 block discarded – undo
381 381
 <?php $this->block()->stop(); ?>
382 382
 
383 383
 
384
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
384
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/coupon/item-standard.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -5,44 +5,44 @@  discard block
 block discarded – undo
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
 $enc = $this->encoder();
18 18
 
19 19
 
20
-$target = $this->config( 'admin/jqadm/url/save/target' );
21
-$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' );
22
-$action = $this->config( 'admin/jqadm/url/save/action', 'save' );
23
-$config = $this->config( 'admin/jqadm/url/save/config', [] );
20
+$target = $this->config('admin/jqadm/url/save/target');
21
+$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm');
22
+$action = $this->config('admin/jqadm/url/save/action', 'save');
23
+$config = $this->config('admin/jqadm/url/save/config', []);
24 24
 
25
-$attributes = $this->get( 'itemAttributes', [] );
26
-$params = $this->get( 'pageParams', [] );
25
+$attributes = $this->get('itemAttributes', []);
26
+$params = $this->get('pageParams', []);
27 27
 
28 28
 
29 29
 ?>
30
-<?php $this->block()->start( 'jqadm_content' ); ?>
30
+<?php $this->block()->start('jqadm_content'); ?>
31 31
 
32
-<form class="item item-coupon form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>">
33
-	<input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.id' ) ) ); ?>" value="<?= $enc->attr( $this->get( 'itemData/coupon.id' ) ); ?>" />
34
-	<input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" />
32
+<form class="item item-coupon form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>">
33
+	<input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'coupon.id'))); ?>" value="<?= $enc->attr($this->get('itemData/coupon.id')); ?>" />
34
+	<input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" />
35 35
 	<?= $this->csrf()->formfield(); ?>
36 36
 
37 37
 	<nav class="main-navbar">
38 38
 		<span class="navbar-brand">
39
-			<?= $enc->html( $this->translate( 'admin', 'Voucher' ) ); ?>:
40
-			<?= $enc->html( $this->get( 'itemData/coupon.id' ) ); ?> -
41
-			<?= $enc->html( $this->get( 'itemData/coupon.label', $this->translate( 'admin', 'New' ) ) ); ?>
42
-			<span class="navbar-secondary">(<?= $enc->html( $this->site()->match( $this->get( 'itemData/coupon.siteid' ) ) ); ?>)</span>
39
+			<?= $enc->html($this->translate('admin', 'Voucher')); ?>:
40
+			<?= $enc->html($this->get('itemData/coupon.id')); ?> -
41
+			<?= $enc->html($this->get('itemData/coupon.label', $this->translate('admin', 'New'))); ?>
42
+			<span class="navbar-secondary">(<?= $enc->html($this->site()->match($this->get('itemData/coupon.siteid'))); ?>)</span>
43 43
 		</span>
44 44
 		<div class="item-actions">
45
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
45
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
46 46
 		</div>
47 47
 	</nav>
48 48
 
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 
54 54
 				<li class="nav-item basic">
55 55
 					<a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic">
56
-						<?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?>
56
+						<?= $enc->html($this->translate('admin', 'Basic')); ?>
57 57
 					</a>
58 58
 				</li>
59 59
 
60
-				<?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?>
61
-					<li class="nav-item <?= $enc->attr( $subpart ); ?>">
62
-						<a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx+1; ?>">
63
-							<?= $enc->html( $this->translate( 'admin', $subpart ) ); ?>
60
+				<?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?>
61
+					<li class="nav-item <?= $enc->attr($subpart); ?>">
62
+						<a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>">
63
+							<?= $enc->html($this->translate('admin', $subpart)); ?>
64 64
 						</a>
65 65
 					</li>
66 66
 				<?php endforeach; ?>
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
 
70 70
 			<div class="item-meta text-muted">
71 71
 				<small>
72
-					<?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>:
73
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/coupon.mtime' ) ); ?></span>
72
+					<?= $enc->html($this->translate('admin', 'Modified')); ?>:
73
+					<span class="meta-value"><?= $enc->html($this->get('itemData/coupon.mtime')); ?></span>
74 74
 				</small>
75 75
 				<small>
76
-					<?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>:
77
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/coupon.ctime' ) ); ?></span>
76
+					<?= $enc->html($this->translate('admin', 'Created')); ?>:
77
+					<span class="meta-value"><?= $enc->html($this->get('itemData/coupon.ctime')); ?></span>
78 78
 				</small>
79 79
 				<small>
80
-					<?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>:
81
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/coupon.editor' ) ); ?></span>
80
+					<?= $enc->html($this->translate('admin', 'Editor')); ?>:
81
+					<span class="meta-value"><?= $enc->html($this->get('itemData/coupon.editor')); ?></span>
82 82
 				</small>
83 83
 			</div>
84 84
 		</div>
@@ -87,111 +87,111 @@  discard block
 block discarded – undo
87 87
 
88 88
 			<div id="basic" class="row item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic">
89 89
 
90
-				<div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?>">
90
+				<div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?>">
91 91
 					<div class="form-group row mandatory">
92
-						<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label>
92
+						<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label>
93 93
 						<div class="col-sm-8">
94 94
 							<select class="form-control custom-select item-status" required="required" tabindex="1"
95
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.status' ) ) ); ?>"
96
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> >
95
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.status'))); ?>"
96
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> >
97 97
 								<option value="">
98
-									<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>
98
+									<?= $enc->html($this->translate('admin', 'Please select')); ?>
99 99
 								</option>
100
-								<option value="1" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), 1 ); ?> >
101
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?>
100
+								<option value="1" <?= $selected($this->get('itemData/coupon.status', 1), 1); ?> >
101
+									<?= $enc->html($this->translate('mshop/code', 'status:1')); ?>
102 102
 								</option>
103
-								<option value="0" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), 0 ); ?> >
104
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?>
103
+								<option value="0" <?= $selected($this->get('itemData/coupon.status', 1), 0); ?> >
104
+									<?= $enc->html($this->translate('mshop/code', 'status:0')); ?>
105 105
 								</option>
106
-								<option value="-1" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), -1 ); ?> >
107
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?>
106
+								<option value="-1" <?= $selected($this->get('itemData/coupon.status', 1), -1); ?> >
107
+									<?= $enc->html($this->translate('mshop/code', 'status:-1')); ?>
108 108
 								</option>
109
-								<option value="-2" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), -2 ); ?> >
110
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?>
109
+								<option value="-2" <?= $selected($this->get('itemData/coupon.status', 1), -2); ?> >
110
+									<?= $enc->html($this->translate('mshop/code', 'status:-2')); ?>
111 111
 								</option>
112 112
 							</select>
113 113
 						</div>
114 114
 					</div>
115 115
 					<div class="form-group row mandatory">
116
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label>
116
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label>
117 117
 						<div class="col-sm-8">
118 118
 							<input class="form-control item-label" type="text" required="required" tabindex="1"
119
-								name="<?= $this->formparam( array( 'item', 'coupon.label' ) ); ?>"
120
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Internal name (required)' ) ); ?>"
121
-								value="<?= $enc->attr( $this->get( 'itemData/coupon.label' ) ); ?>"
122
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
119
+								name="<?= $this->formparam(array('item', 'coupon.label')); ?>"
120
+								placeholder="<?= $enc->attr($this->translate('admin', 'Internal name (required)')); ?>"
121
+								value="<?= $enc->attr($this->get('itemData/coupon.label')); ?>"
122
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
123 123
 						</div>
124 124
 						<div class="col-sm-12 form-text text-muted help-text">
125
-							<?= $enc->html( $this->translate( 'admin', 'Internal article name, will be used on the web site if no product name for the language is available' ) ); ?>
125
+							<?= $enc->html($this->translate('admin', 'Internal article name, will be used on the web site if no product name for the language is available')); ?>
126 126
 						</div>
127 127
 					</div>
128 128
 					<div class="form-group row mandatory">
129
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Provider' ) ); ?></label>
129
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Provider')); ?></label>
130 130
 						<div class="col-sm-8 input-group">
131 131
 							<input class="form-control item-provider combobox" type="text" required="required" tabindex="1"
132
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.provider' ) ) ); ?>"
133
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Provider/decorator class names (required)' ) ); ?>"
134
-								value="<?= $enc->attr( $this->get( 'itemData/coupon.provider' ) ); ?>"
135
-								data-names="<?= implode( ',', $this->get( 'itemProviders', [] ) ); ?>"
136
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
132
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.provider'))); ?>"
133
+								placeholder="<?= $enc->attr($this->translate('admin', 'Provider/decorator class names (required)')); ?>"
134
+								value="<?= $enc->attr($this->get('itemData/coupon.provider')); ?>"
135
+								data-names="<?= implode(',', $this->get('itemProviders', [])); ?>"
136
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
137 137
 							<div class="dropdown input-group-append">
138 138
 								<button class="btn btn-secondary" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+</button>
139 139
 								<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="decoratorButton">
140
-									<?php foreach( $this->get( 'itemDecorators', [] ) as $name ) : ?>
141
-										<li class="dropdown-item"><a class="decorator-name" href="#" data-name="<?= $enc->attr( $name ); ?>"><?= $enc->html( $name ); ?></a></li>
140
+									<?php foreach ($this->get('itemDecorators', []) as $name) : ?>
141
+										<li class="dropdown-item"><a class="decorator-name" href="#" data-name="<?= $enc->attr($name); ?>"><?= $enc->html($name); ?></a></li>
142 142
 									<?php endforeach; ?>
143 143
 								</ul>
144 144
 							</div>
145 145
 						</div>
146 146
 						<div class="col-sm-12 form-text text-muted help-text">
147
-							<?= $enc->html( $this->translate( 'admin', 'One provider and zero or more decorator class names separated by commas' ) ); ?>
147
+							<?= $enc->html($this->translate('admin', 'One provider and zero or more decorator class names separated by commas')); ?>
148 148
 						</div>
149 149
 					</div>
150 150
 					<div class="form-group row optional">
151
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label>
151
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label>
152 152
 						<div class="col-sm-8">
153 153
 							<input class="form-control item-datestart" type="datetime-local" tabindex="1"
154
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.datestart' ) ) ); ?>"
155
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>"
156
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'itemData/coupon.datestart' ) ) ); ?>"
157
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
154
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.datestart'))); ?>"
155
+								placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>"
156
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('itemData/coupon.datestart'))); ?>"
157
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
158 158
 						</div>
159 159
 						<div class="col-sm-12 form-text text-muted help-text">
160
-							<?= $enc->html( $this->translate( 'admin', 'The article is only shown on the web site after that date and time, useful or seasonal articles' ) ); ?>
160
+							<?= $enc->html($this->translate('admin', 'The article is only shown on the web site after that date and time, useful or seasonal articles')); ?>
161 161
 						</div>
162 162
 					</div>
163 163
 					<div class="form-group row optional">
164
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label>
164
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label>
165 165
 						<div class="col-sm-8">
166 166
 							<input class="form-control item-dateend" type="datetime-local" tabindex="1"
167
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.dateend' ) ) ); ?>"
168
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>"
169
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'itemData/coupon.dateend' ) ) ); ?>"
170
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
167
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.dateend'))); ?>"
168
+								placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>"
169
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('itemData/coupon.dateend'))); ?>"
170
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
171 171
 						</div>
172 172
 						<div class="col-sm-12 form-text text-muted help-text">
173
-							<?= $enc->html( $this->translate( 'admin', 'The article is only shown on the web site until that date and time, useful or seasonal articles' ) ); ?>
173
+							<?= $enc->html($this->translate('admin', 'The article is only shown on the web site until that date and time, useful or seasonal articles')); ?>
174 174
 						</div>
175 175
 					</div>
176 176
 				</div><!--
177 177
 
178
-				--><div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?>">
178
+				--><div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?>">
179 179
 					<table class="item-config table table-striped">
180 180
 						<thead>
181 181
 							<tr>
182 182
 								<th class="config-row-key">
183
-									<span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span>
183
+									<span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span>
184 184
 									<div class="form-text text-muted help-text">
185
-										<?= $enc->html( $this->translate( 'admin', 'Coupon provider or coupon decorator configuration name' ) ); ?>
185
+										<?= $enc->html($this->translate('admin', 'Coupon provider or coupon decorator configuration name')); ?>
186 186
 									</div>
187 187
 								</th>
188 188
 								<th class="config-row-value">
189
-									<?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?>
189
+									<?= $enc->html($this->translate('admin', 'Value')); ?>
190 190
 								</th>
191 191
 								<th class="actions">
192
-									<?php if( !$this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ) ) : ?>
192
+									<?php if (!$this->site()->readonly($this->get('itemData/coupon.siteid'))) : ?>
193 193
 										<div class="btn act-add fa" tabindex="1"
194
-											title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>">
194
+											title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>">
195 195
 										</div>
196 196
 									<?php endif; ?>
197 197
 								</th>
@@ -199,26 +199,26 @@  discard block
 block discarded – undo
199 199
 						</thead>
200 200
 						<tbody>
201 201
 
202
-							<?php foreach( (array) $this->get( 'itemData/config/key', [] ) as $idx => $key ) : ?>
202
+							<?php foreach ((array) $this->get('itemData/config/key', []) as $idx => $key) : ?>
203 203
 								<tr class="config-item">
204 204
 									<td class="config-row-key">
205 205
 										<input type="text" class="config-key form-control" tabindex="1"
206
-											name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'key', '' ) ) ); ?>"
207
-											value="<?= $enc->attr( $this->get( 'itemData/config/key/' . $idx, $key ) ); ?>"
208
-											<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
206
+											name="<?= $enc->attr($this->formparam(array('item', 'config', 'key', ''))); ?>"
207
+											value="<?= $enc->attr($this->get('itemData/config/key/' . $idx, $key)); ?>"
208
+											<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
209 209
 										<div class="form-text text-muted help-text"></div>
210 210
 									</td>
211 211
 									<td class="config-row-value">
212
-										<?php $cfgval = $this->get( 'itemData/config/val/' . $idx ); ?>
212
+										<?php $cfgval = $this->get('itemData/config/val/' . $idx); ?>
213 213
 										<input type="text" class="config-value form-control config-type" tabindex="1"
214
-											name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>"
215
-											value="<?= $enc->attr( !is_scalar( $cfgval ) ? json_encode( $cfgval ) : $cfgval ); ?>"
216
-											<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
214
+											name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>"
215
+											value="<?= $enc->attr(!is_scalar($cfgval) ? json_encode($cfgval) : $cfgval); ?>"
216
+											<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
217 217
 									</td>
218 218
 									<td class="actions">
219
-										<?php if( !$this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ) ) : ?>
219
+										<?php if (!$this->site()->readonly($this->get('itemData/coupon.siteid'))) : ?>
220 220
 											<div class="btn act-delete fa" tabindex="1"
221
-												title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>">
221
+												title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>">
222 222
 											</div>
223 223
 										<?php endif; ?>
224 224
 									</td>
@@ -228,20 +228,20 @@  discard block
 block discarded – undo
228 228
 							<tr class="config-item prototype">
229 229
 								<td class="config-row-key">
230 230
 									<input type="text" class="config-key form-control" tabindex="1" disabled="disabled"
231
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'key', '' ) ) ); ?>" />
231
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'key', ''))); ?>" />
232 232
 									<div class="form-text text-muted help-text"></div>
233 233
 								</td>
234 234
 								<td class="config-row-value">
235 235
 
236 236
 									<div class="config-type config-type-map">
237 237
 										<input type="text" class="config-value form-control" tabindex="1" disabled="disabled"
238
-											name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
238
+											name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
239 239
 
240 240
 										<table class="table table-striped config-map-table">
241 241
 											<tr class="config-map-row prototype-map">
242 242
 												<td class="config-map-actions">
243 243
 													<div class="btn act-delete fa" tabindex="1"
244
-														title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>">
244
+														title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>">
245 245
 													</div>
246 246
 												</td>
247 247
 												<td class="config-map-row-key">
@@ -254,12 +254,12 @@  discard block
 block discarded – undo
254 254
 											<tr class="config-map-actions">
255 255
 												<td class="config-map-action-add">
256 256
 													<div class="btn act-add fa" tabindex="1"
257
-														title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry') ); ?>">
257
+														title="<?= $enc->attr($this->translate('admin', 'Insert new entry')); ?>">
258 258
 													</div>
259 259
 												</td>
260 260
 												<td class="config-map-action-update" colspan="2">
261 261
 													<div class="btn btn-primary act-update" tabindex="1">
262
-														<?= $enc->attr( $this->translate( 'admin', 'OK') ); ?>
262
+														<?= $enc->attr($this->translate('admin', 'OK')); ?>
263 263
 													</div>
264 264
 												</td>
265 265
 											</tr>
@@ -267,37 +267,37 @@  discard block
 block discarded – undo
267 267
 									</div>
268 268
 
269 269
 									<select class="config-value form-control config-type config-type-select" tabindex="1" disabled="disabled"
270
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" >
270
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" >
271 271
 									</select>
272 272
 
273 273
 									<select class="config-value form-control config-type config-type-boolean" tabindex="1" disabled="disabled"
274
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" >
274
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" >
275 275
 										<option value=""></option>
276
-										<option value="0"><?= $enc->html( $this->translate( 'client', 'no' ) ); ?></option>
277
-										<option value="1"><?= $enc->html( $this->translate( 'client', 'yes' ) ); ?></option>
276
+										<option value="0"><?= $enc->html($this->translate('client', 'no')); ?></option>
277
+										<option value="1"><?= $enc->html($this->translate('client', 'yes')); ?></option>
278 278
 									</select>
279 279
 
280 280
 									<input type="text" class="config-value form-control config-type config-type-string" tabindex="1" disabled="disabled"
281
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
281
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
282 282
 
283 283
 									<input type="number" class="config-value form-control config-type config-type-number" tabindex="1" disabled="disabled"
284
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" step="0.01" />
284
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" step="0.01" />
285 285
 
286 286
 									<input type="number" class="config-value form-control config-type config-type-integer" tabindex="1" disabled="disabled"
287
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
287
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
288 288
 
289 289
 									<input type="date" class="config-value form-control config-type config-type-date" tabindex="1" disabled="disabled"
290
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
290
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
291 291
 
292 292
 									<input type="datetime-local" class="config-value form-control config-type config-type-datetime" tabindex="1" disabled="disabled"
293
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
293
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
294 294
 
295 295
 									<input type="time" class="config-value form-control config-type config-type-time" tabindex="1" disabled="disabled"
296
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
296
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
297 297
 								</td>
298 298
 								<td class="actions">
299 299
 									<div class="btn act-delete fa" tabindex="1"
300
-										title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>">
300
+										title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>">
301 301
 									</div>
302 302
 								</td>
303 303
 							</tr>
@@ -307,12 +307,12 @@  discard block
 block discarded – undo
307 307
 
308 308
 			</div>
309 309
 
310
-			<?= $this->get( 'itemBody' ); ?>
310
+			<?= $this->get('itemBody'); ?>
311 311
 
312 312
 		</div>
313 313
 
314 314
 		<div class="item-actions">
315
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
315
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
316 316
 		</div>
317 317
 	</div>
318 318
 </form>
@@ -320,4 +320,4 @@  discard block
 block discarded – undo
320 320
 <?php $this->block()->stop(); ?>
321 321
 
322 322
 
323
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
323
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/coupon/list-standard.php 1 patch
Spacing   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@  discard block
 block discarded – undo
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/coupon/fields
@@ -49,40 +49,40 @@  discard block
 block discarded – undo
49 49
  * @category Developer
50 50
  */
51 51
 $default = ['coupon.status', 'coupon.label', 'coupon.provider'];
52
-$default = $this->config( 'admin/jqadm/coupon/fields', $default );
53
-$fields = $this->session( 'aimeos/admin/jqadm/coupon/fields', $default );
52
+$default = $this->config('admin/jqadm/coupon/fields', $default);
53
+$fields = $this->session('aimeos/admin/jqadm/coupon/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
 $columnList = [
59
-	'coupon.id' => $this->translate( 'admin', 'ID' ),
60
-	'coupon.status' => $this->translate( 'admin', 'Status' ),
61
-	'coupon.provider' => $this->translate( 'admin', 'Provider' ),
62
-	'coupon.label' => $this->translate( 'admin', 'Label' ),
63
-	'coupon.datestart' => $this->translate( 'admin', 'Start date' ),
64
-	'coupon.dateend' => $this->translate( 'admin', 'End date' ),
65
-	'coupon.config' => $this->translate( 'admin', 'Config' ),
66
-	'coupon.ctime' => $this->translate( 'admin', 'Created' ),
67
-	'coupon.mtime' => $this->translate( 'admin', 'Modified' ),
68
-	'coupon.editor' => $this->translate( 'admin', 'Editor' ),
59
+	'coupon.id' => $this->translate('admin', 'ID'),
60
+	'coupon.status' => $this->translate('admin', 'Status'),
61
+	'coupon.provider' => $this->translate('admin', 'Provider'),
62
+	'coupon.label' => $this->translate('admin', 'Label'),
63
+	'coupon.datestart' => $this->translate('admin', 'Start date'),
64
+	'coupon.dateend' => $this->translate('admin', 'End date'),
65
+	'coupon.config' => $this->translate('admin', 'Config'),
66
+	'coupon.ctime' => $this->translate('admin', 'Created'),
67
+	'coupon.mtime' => $this->translate('admin', 'Modified'),
68
+	'coupon.editor' => $this->translate('admin', 'Editor'),
69 69
 ];
70 70
 
71 71
 ?>
72
-<?php $this->block()->start( 'jqadm_content' ); ?>
72
+<?php $this->block()->start('jqadm_content'); ?>
73 73
 
74 74
 <nav class="main-navbar">
75 75
 
76 76
 	<span class="navbar-brand">
77
-		<?= $enc->html( $this->translate( 'admin', 'Voucher' ) ); ?>
78
-		<span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span>
77
+		<?= $enc->html($this->translate('admin', 'Voucher')); ?>
78
+		<span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span>
79 79
 	</span>
80 80
 
81 81
 	<?= $this->partial(
82
-		$this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [
83
-			'filter' => $this->session( 'aimeos/admin/jqadm/coupon/filter', [] ),
84
-			'filterAttributes' => $this->get( 'filterAttributes', [] ),
85
-			'filterOperators' => $this->get( 'filterOperators', [] ),
82
+		$this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [
83
+			'filter' => $this->session('aimeos/admin/jqadm/coupon/filter', []),
84
+			'filterAttributes' => $this->get('filterAttributes', []),
85
+			'filterOperators' => $this->get('filterOperators', []),
86 86
 			'params' => $params,
87 87
 		]
88 88
 	); ?>
@@ -90,33 +90,33 @@  discard block
 block discarded – undo
90 90
 
91 91
 
92 92
 <?= $this->partial(
93
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
94
-		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ),
95
-		'page' => $this->session( 'aimeos/admin/jqadm/coupon/page', [] )]
93
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
94
+		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'),
95
+		'page' => $this->session('aimeos/admin/jqadm/coupon/page', [])]
96 96
 	);
97 97
 ?>
98 98
 
99
-<form class="list list-product" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>">
99
+<form class="list list-product" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>">
100 100
 	<?= $this->csrf()->formfield(); ?>
101 101
 
102 102
 	<table class="list-items table table-hover table-striped">
103 103
 		<thead class="list-header">
104 104
 			<tr>
105 105
 				<?= $this->partial(
106
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
107
-						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/coupon/sort' )]
106
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
107
+						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/coupon/sort')]
108 108
 					);
109 109
 				?>
110 110
 
111 111
 				<th class="actions">
112 112
 					<a class="btn fa act-add" tabindex="1"
113
-						href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>"
114
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
115
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>">
113
+						href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>"
114
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
115
+						aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>">
116 116
 					</a>
117 117
 
118 118
 					<?= $this->partial(
119
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
119
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
120 120
 							['fields' => $fields, 'data' => $columnList]
121 121
 						);
122 122
 					?>
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 		<tbody>
127 127
 
128 128
 			<?= $this->partial(
129
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
130
-					'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/coupon/filter', [] ),
129
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
130
+					'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/coupon/filter', []),
131 131
 					'data' => [
132 132
 						'coupon.id' => ['op' => '=='],
133 133
 						'coupon.status' => ['op' => '==', 'type' => 'select', 'val' => [
134
-							'1' => $this->translate( 'mshop/code', 'status:1' ),
135
-							'0' => $this->translate( 'mshop/code', 'status:0' ),
136
-							'-1' => $this->translate( 'mshop/code', 'status:-1' ),
137
-							'-2' => $this->translate( 'mshop/code', 'status:-2' ),
134
+							'1' => $this->translate('mshop/code', 'status:1'),
135
+							'0' => $this->translate('mshop/code', 'status:0'),
136
+							'-1' => $this->translate('mshop/code', 'status:-1'),
137
+							'-2' => $this->translate('mshop/code', 'status:-2'),
138 138
 						]],
139 139
 						'coupon.provider' => [],
140 140
 						'coupon.label' => [],
@@ -148,58 +148,58 @@  discard block
 block discarded – undo
148 148
 				] );
149 149
 			?>
150 150
 
151
-			<?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?>
152
-				<?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?>
153
-				<tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>">
154
-					<?php if( in_array( 'coupon.id', $fields ) ) : ?>
155
-						<td class="coupon-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td>
151
+			<?php foreach ($this->get('items', []) as $id => $item) : ?>
152
+				<?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?>
153
+				<tr class="<?= $this->site()->readonly($item->getSiteId()); ?>">
154
+					<?php if (in_array('coupon.id', $fields)) : ?>
155
+						<td class="coupon-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td>
156 156
 					<?php endif; ?>
157
-					<?php if( in_array( 'coupon.status', $fields ) ) : ?>
158
-						<td class="coupon-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td>
157
+					<?php if (in_array('coupon.status', $fields)) : ?>
158
+						<td class="coupon-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td>
159 159
 					<?php endif; ?>
160
-					<?php if( in_array( 'coupon.provider', $fields ) ) : ?>
161
-						<td class="coupon-provider"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getProvider() ); ?></a></td>
160
+					<?php if (in_array('coupon.provider', $fields)) : ?>
161
+						<td class="coupon-provider"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getProvider()); ?></a></td>
162 162
 					<?php endif; ?>
163
-					<?php if( in_array( 'coupon.label', $fields ) ) : ?>
164
-						<td class="coupon-label"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getLabel() ); ?></a></td>
163
+					<?php if (in_array('coupon.label', $fields)) : ?>
164
+						<td class="coupon-label"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getLabel()); ?></a></td>
165 165
 					<?php endif; ?>
166
-					<?php if( in_array( 'coupon.datestart', $fields ) ) : ?>
167
-						<td class="coupon-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateStart() ); ?></a></td>
166
+					<?php if (in_array('coupon.datestart', $fields)) : ?>
167
+						<td class="coupon-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateStart()); ?></a></td>
168 168
 					<?php endif; ?>
169
-					<?php if( in_array( 'coupon.dateend', $fields ) ) : ?>
170
-						<td class="coupon-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateEnd() ); ?></a></td>
169
+					<?php if (in_array('coupon.dateend', $fields)) : ?>
170
+						<td class="coupon-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateEnd()); ?></a></td>
171 171
 					<?php endif; ?>
172
-					<?php if( in_array( 'coupon.config', $fields ) ) : ?>
172
+					<?php if (in_array('coupon.config', $fields)) : ?>
173 173
 						<td class="coupon-config config-item">
174 174
 							<a class="items-field" href="<?= $url; ?>">
175
-								<?php foreach( $item->getConfig() as $key => $value ) : ?>
176
-									<span class="config-key"><?= $enc->html( $key ); ?></span>
177
-									<span class="config-value"><?= $enc->html( !is_scalar( $value ) ? json_encode( $value ) : $value ); ?></span>
175
+								<?php foreach ($item->getConfig() as $key => $value) : ?>
176
+									<span class="config-key"><?= $enc->html($key); ?></span>
177
+									<span class="config-value"><?= $enc->html(!is_scalar($value) ? json_encode($value) : $value); ?></span>
178 178
 									<br/>
179 179
 								<?php endforeach; ?>
180 180
 							</a>
181 181
 						</td>
182 182
 					<?php endif; ?>
183
-					<?php if( in_array( 'coupon.ctime', $fields ) ) : ?>
184
-						<td class="coupon-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td>
183
+					<?php if (in_array('coupon.ctime', $fields)) : ?>
184
+						<td class="coupon-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td>
185 185
 					<?php endif; ?>
186
-					<?php if( in_array( 'coupon.mtime', $fields ) ) : ?>
187
-						<td class="coupon-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td>
186
+					<?php if (in_array('coupon.mtime', $fields)) : ?>
187
+						<td class="coupon-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td>
188 188
 					<?php endif; ?>
189
-					<?php if( in_array( 'coupon.editor', $fields ) ) : ?>
190
-						<td class="coupon-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td>
189
+					<?php if (in_array('coupon.editor', $fields)) : ?>
190
+						<td class="coupon-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td>
191 191
 					<?php endif; ?>
192 192
 
193 193
 					<td class="actions">
194 194
 						<a class="btn act-copy fa" tabindex="1"
195
-							href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>"
196
-							title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>"
197
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a>
198
-						<?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?>
195
+							href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>"
196
+							title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>"
197
+							aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a>
198
+						<?php if (!$this->site()->readonly($item->getSiteId())) : ?>
199 199
 							<a class="btn act-delete fa" tabindex="1"
200
-								href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'coupon', 'id' => $id] + $params, [], $delConfig ) ); ?>"
201
-								title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
202
-								aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a>
200
+								href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'coupon', 'id' => $id] + $params, [], $delConfig)); ?>"
201
+								title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
202
+								aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a>
203 203
 						<?php endif; ?>
204 204
 					</td>
205 205
 				</tr>
@@ -207,18 +207,18 @@  discard block
 block discarded – undo
207 207
 		</tbody>
208 208
 	</table>
209 209
 
210
-	<?php if( $this->get( 'items', [] ) === [] ) : ?>
211
-		<?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?>
210
+	<?php if ($this->get('items', []) === []) : ?>
211
+		<?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?>
212 212
 	<?php endif; ?>
213 213
 </form>
214 214
 
215 215
 <?= $this->partial(
216
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
217
-		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ),
218
-		'page' => $this->session( 'aimeos/admin/jqadm/coupon/page', [] )]
216
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
217
+		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'),
218
+		'page' => $this->session('aimeos/admin/jqadm/coupon/page', [])]
219 219
 	);
220 220
 ?>
221 221
 
222 222
 <?php $this->block()->stop(); ?>
223 223
 
224
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
224
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/coupon/item-code-standard.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 
9
-$selected = function( $key, $code ) {
10
-	return ( $key == $code ? 'selected="selected"' : '' );
9
+$selected = function($key, $code) {
10
+	return ($key == $code ? 'selected="selected"' : '');
11 11
 };
12 12
 
13
-$jsonTarget = $this->config( 'admin/jsonadm/url/target' );
14
-$jsonCntl = $this->config( 'admin/jsonadm/url/controller', 'Jsonadm' );
15
-$jsonAction = $this->config( 'admin/jsonadm/url/action', 'index' );
16
-$jsonConfig = $this->config( 'admin/jsonadm/url/config', [] );
13
+$jsonTarget = $this->config('admin/jsonadm/url/target');
14
+$jsonCntl = $this->config('admin/jsonadm/url/controller', 'Jsonadm');
15
+$jsonAction = $this->config('admin/jsonadm/url/action', 'index');
16
+$jsonConfig = $this->config('admin/jsonadm/url/config', []);
17 17
 
18 18
 $enc = $this->encoder();
19
-$params = $this->get( 'pageParams', [] );
19
+$params = $this->get('pageParams', []);
20 20
 
21 21
 
22 22
 /** admin/jqadm/coupon/code/fields
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
  * @since 2017.10
34 34
  * @category Developer
35 35
  */
36
-$default = $this->config( 'admin/jqadm/coupon/code/fields', ['coupon.code.code', 'coupon.code.count'] );
37
-$fields = $this->session( 'aimeos/admin/jqadm/couponcode/fields', $default );
36
+$default = $this->config('admin/jqadm/coupon/code/fields', ['coupon.code.code', 'coupon.code.count']);
37
+$fields = $this->session('aimeos/admin/jqadm/couponcode/fields', $default);
38 38
 
39 39
 $columnList = [
40
-	'coupon.code.code' => $this->translate( 'admin', 'Code' ),
41
-	'coupon.code.count' => $this->translate( 'admin', 'Count' ),
42
-	'coupon.code.datestart' => $this->translate( 'admin', 'Start date' ),
43
-	'coupon.code.dateend' => $this->translate( 'admin', 'End date' ),
44
-	'coupon.code.ctime' => $this->translate( 'admin', 'Created' ),
45
-	'coupon.code.mtime' => $this->translate( 'admin', 'Modified' ),
46
-	'coupon.code.editor' => $this->translate( 'admin', 'Editor' ),
40
+	'coupon.code.code' => $this->translate('admin', 'Code'),
41
+	'coupon.code.count' => $this->translate('admin', 'Count'),
42
+	'coupon.code.datestart' => $this->translate('admin', 'Start date'),
43
+	'coupon.code.dateend' => $this->translate('admin', 'End date'),
44
+	'coupon.code.ctime' => $this->translate('admin', 'Created'),
45
+	'coupon.code.mtime' => $this->translate('admin', 'Modified'),
46
+	'coupon.code.editor' => $this->translate('admin', 'Editor'),
47 47
 ];
48 48
 
49 49
 
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 <div id="code" class="item-code content-block tab-pane fade" role="tabpanel" aria-labelledby="code">
52 52
 
53 53
 	<?= $this->partial(
54
-			$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
55
-			['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'codeTotal' ),
54
+			$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
55
+			['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('codeTotal'),
56 56
 			'group' => 'vc', 'action' => 'get', 'fragment' => 'code',
57
-			'page' =>$this->session( 'aimeos/admin/jqadm/couponcode/page', [] )]
57
+			'page' =>$this->session('aimeos/admin/jqadm/couponcode/page', [])]
58 58
 		);
59 59
 	?>
60 60
 
@@ -62,40 +62,40 @@  discard block
 block discarded – undo
62 62
 		<thead class="list-header">
63 63
 			<tr>
64 64
 				<?= $this->partial(
65
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
66
-						['fields' => $fields, 'params' => $params, 'tabindex' => $this->get( 'tabindex' ),
65
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
66
+						['fields' => $fields, 'params' => $params, 'tabindex' => $this->get('tabindex'),
67 67
 						'data' => $columnList, 'group' => 'vc', 'action' => 'get', 'fragment' => 'code',
68
-						'sort' => $this->session( 'aimeos/admin/jqadm/couponcode/sort' )]
68
+						'sort' => $this->session('aimeos/admin/jqadm/couponcode/sort')]
69 69
 					);
70 70
 				?>
71 71
 
72 72
 				<th class="actions">
73 73
 					<div class="dropdown list-menu">
74 74
 						<button class="btn act-menu fa" type="button" id="menuButton"
75
-							data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tabindex="<?= $this->get( 'tabindex' ); ?>"
76
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'More' ) ); ?>"
77
-							title="<?= $enc->attr( $this->translate( 'admin', 'More') ); ?>">
75
+							data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tabindex="<?= $this->get('tabindex'); ?>"
76
+							aria-label="<?= $enc->attr($this->translate('admin', 'More')); ?>"
77
+							title="<?= $enc->attr($this->translate('admin', 'More')); ?>">
78 78
 						</button>
79 79
 						<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="menuButton">
80 80
 							<li class="dropdown-item">
81
-								<a class="btn act-add fa label" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>"
82
-									title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
83
-									aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>">
84
-									<?= $enc->html( $this->translate( 'admin', 'Add' ) ); ?>
81
+								<a class="btn act-add fa label" href="#" tabindex="<?= $this->get('tabindex'); ?>"
82
+									title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
83
+									aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>">
84
+									<?= $enc->html($this->translate('admin', 'Add')); ?>
85 85
 								</a>
86 86
 							</li>
87 87
 							<li class="dropdown-item">
88 88
 								<div class="btn fa fa-upload label">
89
-									<?= $enc->html( $this->translate( 'admin', 'Import' ) ); ?>
90
-									<input class="fileupload act-import" type="file" name="code[file]" tabindex="<?= $this->get( 'tabindex' ); ?>" />
89
+									<?= $enc->html($this->translate('admin', 'Import')); ?>
90
+									<input class="fileupload act-import" type="file" name="code[file]" tabindex="<?= $this->get('tabindex'); ?>" />
91 91
 								</div>
92 92
 							</li>
93 93
 						</ul>
94 94
 					</div>
95 95
 
96 96
 					<?= $this->partial(
97
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
98
-							['fields' => $fields, 'group' => 'vc', 'data' => $columnList, 'tabindex' => $this->get( 'tabindex' )]
97
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
98
+							['fields' => $fields, 'group' => 'vc', 'data' => $columnList, 'tabindex' => $this->get('tabindex')]
99 99
 						);
100 100
 					?>
101 101
 				</th>
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 		</thead>
104 104
 		<tbody>
105 105
 			<?= $this->partial(
106
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
107
-					'filter' => $this->session( 'aimeos/admin/jqadm/couponcode/filter', [] ),
108
-					'fields' => $fields, 'group' => 'vc', 'tabindex' => $this->get( 'tabindex' ),
106
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
107
+					'filter' => $this->session('aimeos/admin/jqadm/couponcode/filter', []),
108
+					'fields' => $fields, 'group' => 'vc', 'tabindex' => $this->get('tabindex'),
109 109
 					'data' => [
110 110
 						'coupon.code.code' => [],
111 111
 						'coupon.code.count' => ['op' => '=='],
@@ -119,118 +119,118 @@  discard block
 block discarded – undo
119 119
 			?>
120 120
 
121 121
 			<tr class="list-item-new prototype">
122
-				<td colspan="<?= count( $fields ); ?>">
122
+				<td colspan="<?= count($fields); ?>">
123 123
 					<div class="content-block row">
124 124
 						<div class="col-xl-6">
125 125
 							<div class="form-group row mandatory">
126
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Voucher' ) ); ?></label>
126
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Voucher')); ?></label>
127 127
 								<div class="col-sm-8">
128
-									<input class="form-control coupon-code-code" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" required="required"
129
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.code', '' ) ) ); ?>" disabled="disabled" />
128
+									<input class="form-control coupon-code-code" type="text" tabindex="<?= $this->get('tabindex'); ?>" required="required"
129
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.code', ''))); ?>" disabled="disabled" />
130 130
 								</div>
131 131
 							</div>
132 132
 							<div class="form-group row mandatory">
133
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Count' ) ); ?></label>
133
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Count')); ?></label>
134 134
 								<div class="col-sm-8">
135
-									<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get( 'tabindex' ); ?>" required="required"
136
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.count', '' ) ) ); ?>" disabled="disabled" />
135
+									<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get('tabindex'); ?>" required="required"
136
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.count', ''))); ?>" disabled="disabled" />
137 137
 								</div>
138 138
 							</div>
139 139
 						</div>
140 140
 						<div class="col-xl-6">
141 141
 							<div class="form-group row optional">
142
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label>
142
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Start date')); ?></label>
143 143
 								<div class="col-sm-8">
144
-									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
145
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.dateend', '' ) ) ); ?>" disabled="disabled" />
144
+									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
145
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.dateend', ''))); ?>" disabled="disabled" />
146 146
 								</div>
147 147
 							</div>
148 148
 							<div class="form-group row optional">
149
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label>
149
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'End date')); ?></label>
150 150
 								<div class="col-sm-8">
151
-									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
152
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.dateend', '' ) ) ); ?>" disabled="disabled" />
151
+									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
152
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.dateend', ''))); ?>" disabled="disabled" />
153 153
 								</div>
154 154
 							</div>
155 155
 						</div>
156 156
 					</div>
157 157
 				</td>
158 158
 				<td class="actions">
159
-					<input type="hidden" name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.id', '' ) ) ); ?>" disabled="disabled" />
159
+					<input type="hidden" name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.id', ''))); ?>" disabled="disabled" />
160 160
 
161
-					<a class="btn fa act-close" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>"
162
-						title="<?= $enc->attr( $this->translate( 'admin', 'Close') ); ?>"
163
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Close' ) ); ?>">
161
+					<a class="btn fa act-close" href="#" tabindex="<?= $this->get('tabindex'); ?>"
162
+						title="<?= $enc->attr($this->translate('admin', 'Close')); ?>"
163
+						aria-label="<?= $enc->attr($this->translate('admin', 'Close')); ?>">
164 164
 					</a>
165 165
 				</td>
166 166
 			</tr>
167 167
 
168
-			<?php foreach( $this->get( 'codeData/coupon.code.id', [] ) as $idx => $id ) : ?>
169
-				<tr class="list-item <?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?>">
170
-					<?php if( in_array( 'coupon.code.code', $fields ) ) : ?>
168
+			<?php foreach ($this->get('codeData/coupon.code.id', []) as $idx => $id) : ?>
169
+				<tr class="list-item <?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?>">
170
+					<?php if (in_array('coupon.code.code', $fields)) : ?>
171 171
 						<td class="coupon-code">
172
-							<input class="form-control coupon-code-code" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>"
173
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.code', '' ) ) ); ?>"
174
-								value="<?= $enc->attr( $this->get( 'codeData/coupon.code.code/' . $idx ) ); ?>"
175
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
172
+							<input class="form-control coupon-code-code" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>"
173
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.code', ''))); ?>"
174
+								value="<?= $enc->attr($this->get('codeData/coupon.code.code/' . $idx)); ?>"
175
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
176 176
 						</td>
177 177
 					<?php endif; ?>
178
-					<?php if( in_array( 'coupon.code.count', $fields ) ) : ?>
178
+					<?php if (in_array('coupon.code.count', $fields)) : ?>
179 179
 						<td class="coupon-count">
180
-							<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get( 'tabindex' ); ?>"
181
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.count', '' ) ) ); ?>"
182
-								value="<?= $enc->attr( $this->get( 'codeData/coupon.code.count/' . $idx ) ); ?>"
183
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
180
+							<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get('tabindex'); ?>"
181
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.count', ''))); ?>"
182
+								value="<?= $enc->attr($this->get('codeData/coupon.code.count/' . $idx)); ?>"
183
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
184 184
 						</td>
185 185
 					<?php endif; ?>
186
-					<?php if( in_array( 'coupon.code.datestart', $fields ) ) : ?>
186
+					<?php if (in_array('coupon.code.datestart', $fields)) : ?>
187 187
 						<td class="coupon-datestart">
188
-							<input class="form-control coupon-code-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
189
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.datestart', '' ) ) ); ?>"
190
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'codeData/coupon.code.datestart/' . $idx ) ) ); ?>"
191
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
188
+							<input class="form-control coupon-code-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
189
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.datestart', ''))); ?>"
190
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('codeData/coupon.code.datestart/' . $idx))); ?>"
191
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
192 192
 						</td>
193 193
 					<?php endif; ?>
194
-					<?php if( in_array( 'coupon.code.dateend', $fields ) ) : ?>
194
+					<?php if (in_array('coupon.code.dateend', $fields)) : ?>
195 195
 						<td class="coupon-dateend">
196
-							<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
197
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.dateend', '' ) ) ); ?>"
198
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'codeData/coupon.code.dateend/' . $idx ) ) ); ?>"
199
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
196
+							<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
197
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.dateend', ''))); ?>"
198
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('codeData/coupon.code.dateend/' . $idx))); ?>"
199
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
200 200
 						</td>
201 201
 					<?php endif; ?>
202
-					<?php if( in_array( 'coupon.code.ctime', $fields ) ) : ?>
202
+					<?php if (in_array('coupon.code.ctime', $fields)) : ?>
203 203
 						<td class="coupon-ctime">
204 204
 							<span class="form-control coupon-code-ctime">
205
-								<?= $enc->attr( $this->get( 'codeData/coupon.code.ctime/' . $idx ) ); ?>
205
+								<?= $enc->attr($this->get('codeData/coupon.code.ctime/' . $idx)); ?>
206 206
 							</span>
207 207
 						</td>
208 208
 					<?php endif; ?>
209
-					<?php if( in_array( 'coupon.code.mtime', $fields ) ) : ?>
209
+					<?php if (in_array('coupon.code.mtime', $fields)) : ?>
210 210
 						<td class="coupon-mtime">
211 211
 							<span class="form-control coupon-code-mtime">
212
-								<?= $enc->attr( $this->get( 'codeData/coupon.code.mtime/' . $idx ) ); ?>
212
+								<?= $enc->attr($this->get('codeData/coupon.code.mtime/' . $idx)); ?>
213 213
 							</span>
214 214
 						</td>
215 215
 					<?php endif; ?>
216
-					<?php if( in_array( 'coupon.code.editor', $fields ) ) : ?>
216
+					<?php if (in_array('coupon.code.editor', $fields)) : ?>
217 217
 						<td class="coupon-editor">
218 218
 							<span class="form-control coupon-code-editor">
219
-								<?= $enc->attr( $this->get( 'codeData/coupon.code.editor/' . $idx ) ); ?>
219
+								<?= $enc->attr($this->get('codeData/coupon.code.editor/' . $idx)); ?>
220 220
 							</span>
221 221
 						</td>
222 222
 					<?php endif; ?>
223 223
 					<td class="actions">
224
-						<input type="hidden" value="<?= $enc->attr( $id ); ?>" disabled="disabled"
225
-							name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.id', '' ) ) ); ?>" />
226
-
227
-						<a class="btn act-edit fa" tabindex="<?= $this->get( 'tabindex' ); ?>" href="#"
228
-							title="<?= $enc->attr( $this->translate( 'admin', 'Edit this entry') ); ?>"
229
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Edit' ) ); ?>"></a>
230
-						<a class="btn fa act-delete" tabindex="<?= $this->get( 'tabindex' ); ?>"
231
-							href="<?= $this->url( $jsonTarget, $jsonCntl, $jsonAction, ['resource' => 'coupon/code', 'id' => $id], [], $jsonConfig ); ?>"
232
-							title="<?= $enc->attr( $this->translate( 'admin', 'Delete') ); ?>"
233
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>">
224
+						<input type="hidden" value="<?= $enc->attr($id); ?>" disabled="disabled"
225
+							name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.id', ''))); ?>" />
226
+
227
+						<a class="btn act-edit fa" tabindex="<?= $this->get('tabindex'); ?>" href="#"
228
+							title="<?= $enc->attr($this->translate('admin', 'Edit this entry')); ?>"
229
+							aria-label="<?= $enc->attr($this->translate('admin', 'Edit')); ?>"></a>
230
+						<a class="btn fa act-delete" tabindex="<?= $this->get('tabindex'); ?>"
231
+							href="<?= $this->url($jsonTarget, $jsonCntl, $jsonAction, ['resource' => 'coupon/code', 'id' => $id], [], $jsonConfig); ?>"
232
+							title="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"
233
+							aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>">
234 234
 						</a>
235 235
 					</td>
236 236
 				</tr>
@@ -238,16 +238,16 @@  discard block
 block discarded – undo
238 238
 		</tbody>
239 239
 	</table>
240 240
 
241
-	<?php if( $this->get( 'codeData/coupon.code.siteid', [] ) === [] ) : ?>
242
-		<div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div>
241
+	<?php if ($this->get('codeData/coupon.code.siteid', []) === []) : ?>
242
+		<div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div>
243 243
 	<?php endif; ?>
244 244
 
245 245
 	<?= $this->partial(
246
-			$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
247
-			['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'codeTotal' ),
246
+			$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
247
+			['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('codeTotal'),
248 248
 			'group' => 'vc', 'action' => 'get', 'fragment' => 'code',
249
-			'page' =>$this->session( 'aimeos/admin/jqadm/couponcode/page', [] )]
249
+			'page' =>$this->session('aimeos/admin/jqadm/couponcode/page', [])]
250 250
 		);
251 251
 	?>
252 252
 </div>
253
-<?= $this->get( 'codeBody' ); ?>
253
+<?= $this->get('codeBody'); ?>
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Related/Standard.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Related;
12 12
 
13
-sprintf( 'related' ); // for translation
13
+sprintf('related'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->relatedBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->relatedBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->relatedBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->relatedBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->relatedBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->relatedBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->relatedBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->relatedBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-related' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-related' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-related' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-related' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/related/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/related/decorators/excludes
209 209
 		 * @see admin/jqadm/product/related/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/related/' . $type, $name );
211
+		return $this->createSubClient('product/related/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2016.01
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/related/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/related/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/related/template-item
268 268
 		 * Relative path to the HTML body template of the related subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/related/template-item';
287 287
 		$default = 'product/item-related-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Option/Standard.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Option;
12 12
 
13
-sprintf( 'option' ); // for translation
13
+sprintf('option'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->optionBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->optionBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->optionBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->optionBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->optionBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->optionBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->optionBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->optionBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-option' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-option' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-option' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-option' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/option/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/option/decorators/excludes
209 209
 		 * @see admin/jqadm/product/option/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/option/' . $type, $name );
211
+		return $this->createSubClient('product/option/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2017.03
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/option/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/option/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/option/template-item
268 268
 		 * Relative path to the HTML body template of the option subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/option/template-item';
287 287
 		$default = 'product/item-option-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Characteristic/Standard.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Characteristic;
12 12
 
13
-sprintf( 'characteristic' ); // for translation
13
+sprintf('characteristic'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->characteristicBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->characteristicBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->characteristicBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->characteristicBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->characteristicBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->characteristicBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->characteristicBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->characteristicBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-characteristic' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-characteristic' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-characteristic' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-characteristic' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/characteristic/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/characteristic/decorators/excludes
209 209
 		 * @see admin/jqadm/product/characteristic/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/characteristic/' . $type, $name );
211
+		return $this->createSubClient('product/characteristic/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2016.01
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/characteristic/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/characteristic/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/characteristic/template-item
268 268
 		 * Relative path to the HTML body template of the characteristic subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/characteristic/template-item';
287 287
 		$default = 'product/item-characteristic-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.