1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
<?php
namespace wpsgTicket;
?>
<div id="wpsg_ticket_modul_template">
<div class="head">
<a href="#" @click.prevent="addTemplate" title="<?php echo __('Neues Template anlegen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
</a>
<div v-if="data.arTemplates.length > 0">
<select v-model="template">
<option :value="null"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
<option v-for="(template, index) in data.arTemplates" :value="template">
{{template.template_name}} ({{template.config.arField.length}} <?php echo __('Felder', 'wpsg'); ?><template v-if="template.defaulttemplate">, <?php echo __('Standard', 'wpsg'); ?></template>)
</option>
</select>
</div>
<div v-else>
<?php echo __('Keine Templates vorhanden', 'wpsg'); ?>
</div>
<a v-if="template" href="#" @click.prevent="removeTemplate" title="<?php echo __('Template löschen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-trash"></span>
</a>
</div>
<div v-if="template" class="template">
<div class="form-group form-group-sm has-feedback">
<label class="col-sm-6 control-label label-copy" for="wpsg_mod_downloadplus_filename">
<a href="#" title="<?php echo __('Template kopieren', 'wpsg'); ?>" @click="copyTemplate()"><span class="wpsg-glyphicon glyphicon glyphicon-copy"></span></a>
<span><?php echo __('Name des Templates', 'wpsg'); ?></span>
</label>
<div class="col-sm-6">
<div class="wpsg_field_wrap wpsg_field_wrap_template_name">
<input type="text" v-model="template.template_name" />
<div>
<label class="control-label"><?php echo __('Standard: ', 'wpsg'); ?></label>
<input type="checkbox" :checked="template.defaulttemplate" @click="setDefaultTemplate" />
</div>
</div>
</div>
</div>
<div class="form-group form-group-sm has-feedback">
<label class="col-sm-6 control-label"><?php echo __('Template Größe (mm)', 'wpsg'); ?></label>
<div class="col-sm-6">
<div class="wpsg_field_wrap flex items-center justify-start gap-2">
<input type="text" class="form-control input-sm" autocomplete="off" v-model="template.config.width">
x
<input type="text" class="form-control input-sm" autocomplete="off" v-model="template.config.height">
</div>
</div>
</div>
<div class="form-group form-group-sm has-feedback">
<label class="col-sm-6 control-label"><?php echo __('Hintergrund (PDF/JPEG)', 'wpsg'); ?></label>
<div class="col-sm-6">
<div class="wpsg_field_wrap flex items-start justify-between gap-2">
<input type="file" @change.prevent="uploadBg" ref="file_upload" accept=".jpeg,.jpg,.pdf" />
<span class="flex items-center">
<a v-if="template.hasBackground" :href="template.url_bg_download" target="_blank"><?php echo __('Anzeigen', 'wpsg'); ?></a>
</span>
</div>
</div>
</div>
<br />
<table class="table table_qr table-body-striped wpsg_mod_downloadplus_fieldtable">
<thead>
<tr>
<th colspan="8"><?php echo __('QR - Code', 'wpsg'); ?></th>
</tr>
</thead>
<template v-for="(field, field_index) in template.config.arField">
<tbody v-if="field.text === '%qr%'">
<tr>
<td class="col_w0"></td>
<td class="col_w1">
<div class="text-right"><strong><?php echo __('X / Y', 'wpsg'); ?></strong></div>
</td>
<td class="col_w1">
<div clasS="flex items-center gap-2">
<input type="text" style="width:50px;" v-model="field.x" />
<span>/</span>
<input type="text" style="width:50px;" v-model="field.y" />
</div>
</td>
<td class="col_w1">
<div class="text-right"><strong><?php echo __('Breite', 'wpsg'); ?></strong></div>
</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.w" />
</td>
<td class="col_w1">
<div class="text-right"><strong><?php echo __('Höhe', 'wpsg'); ?>:</strong></div>
</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.h" />
</td>
<td class="col_w0"></td>
</tr>
</tbody>
</template>
</table>
<table class="table table-body-striped wpsg_mod_downloadplus_fieldtable">
<thead>
<tr>
<th colspan="8"><?php echo __('Weitere Felder mit Platzhaltern', 'wpsg'); ?></th>
</tr>
<tr>
<th class="col_w0">
<a href="#" @click.prevent="addField" title="<?php echo __('Neues Feld', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
</a>
</th>
<th class="col_w1"><?php echo __('X', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Y', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Ausrichtung', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Farbe', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Deckkraft', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Winkel', 'wpsg'); ?></th>
<th class="col_action"></th>
</tr>
</thead>
<template v-for="(field, field_index) in template.config.arField">
<tbody v-if="field.text !== '%qr%'">
<tr>
<td class="col_w0">#{{field_index + 1}}</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.x" />
</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.y" />
</td>
<td class="col_w1">
<select v-model="field.align" v-if="field.text !== '%qr%'">
<option value="L">Links</option>
<option value="C">Zentriert</option>
<option value="R">Rechts</option>
</select>
<div v-else class="text-right"><strong><?php echo __('Breite', 'wpsg'); ?></strong></div>
</td>
<td class="col_w1">
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:75px;" v-model="field.color" />
<input v-else type="text" style="width:50px;" v-model="field.w" />
</td>
<td class="col_w1">
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:50px;" v-model="field.opaque" />
<div v-else class="text-right"><strong><?php echo __('Höhe', 'wpsg'); ?>:</strong></div>
</td>
<td class="col_w1">
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:50px;" v-model="field.angle" />
<input v-else type="text" style="width:50px;" v-model="field.h" />
</td>
<td class="col_w0"></td>
</tr>
<tr>
<td class="col_w0">
<a href="#" @click.prevent="addField(field_index)" title="<?php echo __('Neues Feld davor einfügen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
</a>
</td>
<td class="col_freitext_label col_w1" colspan="1">
<span v-if="field.text !== '%qr%'"><?php echo __('Freitext', 'wpsg'); ?>:</span>
</td>
<td colspan="5" class="col_freitext">
<div class="flex items-center gap-2">
<input v-if="field.text !== '%qr%'" type="text" style="width:100%;" v-model="field.text" />
<span v-else>QR Code</span>
<template v-if="field.text !== '%qr%'">
<select class="fontselect" v-model="field.font" style="width:100%;">
<option v-for="(font, index_font) in data.arFonts" :value="font.code">{{font.label}}</option>
</select>
<select v-model="field.fontsize" style="width:100%;">
<option v-for="size in [4,5,6,7,8,9,10,11,12,13,14,16,18,20,22,24,26,28,30,32,34]" :value="size">{{size}}</option>
</select>
</template>
</div>
</td>
<td>
<a v-if="field.text !== '%qr%'" target="_blank" href="#" @click.prevent="removeField(field_index)" title="<?php echo __('Feld löschen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
</template>
</table>
<a :href="template.url_preview" target="_blank" class="button button-primary"><?php echo __('Vorschau', 'wpsg'); ?></a>
</div>
<br />
</div>
|