Subversion Repositories wpShopGermany4

Rev

Rev 6597 | Rev 7103 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2975 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Einstellungen des "Lieferschein" Moduls
5
	 */
6
 
7
?>
5749 daniel 8
 
9
<div>
7094 florian 10
	<ul class="nav nav-tabs" role="tablist">
11
		<li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
12
		<li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Fußzeile', 'wpsg'); ?></a></li>
13
		<li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
14
	</ul>
15
	<div class="tab-content">
16
		<div role="tabpanel" class="tab-pane active" id="tab1">
5749 daniel 17
 
7094 florian 18
			<?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_adressrow', __('Adresszeile', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_adressrow'), array('help' => 'wpsg_mod_deliverynote_adressrow')); ?>
5749 daniel 19
 
7094 florian 20
			<?php echo wpsg_drawForm_TextStart(); ?>
21
			<div style="position:relative;">
22
				<?php if ($this->view['wpsg_mod_deliverynote']['bp'] === false) { ?>
23
					<p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
24
				<?php } else { ?>
25
					<a href="<?php echo $this->view['wpsg_mod_deliverynote']['bp']; ?>" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
26
				<?php } ?>
27
				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp" data-wpsg-tip="mod_deliverynote_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_bp"></a>
28
				<input type="file" name="wpsg_mod_deliverynote_bp">
29
				<?php $strSuffix = ''; if ($this->view['wpsg_mod_deliverynote']['bp'] !== false) { $strSuffix = '
5749 daniel 30
                    <label>
31
						<input type="checkbox" name="wpsg_mod_deliverynote_bp_del" value="1" />&nbsp;'.__('Löschen', 'wpsg').'
32
					</label>';
5997 hartmut 33
					echo __($strSuffix);
7094 florian 34
				} ?>
6006 hartmut 35
			</div>
7094 florian 36
			<?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_deliverynote_bp')); ?>
5749 daniel 37
 
7094 florian 38
			<?php echo wpsg_drawForm_TextStart(); ?>
39
			<div style="position:relative;">
40
				<?php if ($this->view['wpsg_mod_deliverynote']['logo'] === false) { ?>
41
					<p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
42
				<?php } else { ?>
43
					<a href="<?php echo stripslashes($this->view['wpsg_mod_deliverynote']['logo']); ?>" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
44
				<?php } ?>
45
				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo" data-wpsg-tip="mod_deliverynote_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_deliverynote_logo"></a>
46
				<input type="file" name="wpsg_mod_deliverynote_logo">
47
				<?php $logo_pos = $this->get_option("wpsg_mod_deliverynote_logo_position"); ?>
48
				<?php $defaultAlign = !isset($logo_pos) || empty($logo_pos) ? "align-buttons-active" : ""; ?>
49
 
50
				<?php $alignLeft = $logo_pos === 'left' ? "align-buttons-active" : ""; ?>
51
				<?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
52
				<?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
53
 
54
				<?php $logo_transparency = $this->get_option("wpsg_mod_deliverynote_logo_transparency") ?: "0%"; ?>
55
 
56
				<?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
57
					<div class="row">
58
						<div class="col-md-4">
59
							<div class="align-buttons">
60
								<input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-left '.$alignLeft.'" name="wpsg_mod_deliverynote_logo_position_left" value="&#xf036" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo linksbündig ausrichten").'">
61
								<input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-center '.$alignCenter.'" name="wpsg_mod_deliverynote_logo_position_center" value="&#xf037" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo zentrieren").'">
62
								<input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-right '.$alignRight.' '.$defaultAlign.'" name="wpsg_mod_deliverynote_logo_position_right" value="&#xf038" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo rechtsbündig ausrichten").'">
63
							</div>
64
						</div>
65
						<div class="col-md-8 logo-transparency">
66
							<label>
67
								<input type="text" name="wpsg_mod_deliverynote_logo_transparency" value="'.$logo_transparency.'" />&nbsp;'.__('Logodeckkraft', 'wpsg').'
68
							</label>
69
						</div>
70
						<div class="col-md-12">
71
							<label>
72
								<input type="checkbox" name="wpsg_mod_deliverynote_logo_del" value="1" />&nbsp;'.__('Löschen', 'wpsg').'
73
							</label>
74
						</div>
75
					</div>';
5997 hartmut 76
					echo __($strSuffix);
5749 daniel 77
				} ?>
78
 
7094 florian 79
				<button class="button wpsg_deliverynote_preview" style="float:right; margin-right:10px;" name="wpsg_deliverynote_preview" type="button">
80
					<?php echo __("Vorschau", "wpsg"); ?>
81
				</button>
82
 
83
			</div>
84
			<?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_deliverynote_logo')); ?>
85
 
2975 daniel 86
			<br />
5749 daniel 87
 
88
			<table class="table table-body-striped wpsg_mod_deliverynote_fieldtable">
7094 florian 89
				<thead>
90
				<tr>
91
					<th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
92
					<th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
93
					<th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
94
					<th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
95
					<th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
96
					<th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
97
					<th class="col_action"></th>
98
				</tr>
99
				</thead>
100
				<tbody>
101
				<?php foreach ($this->view['wpsg_mod_deliverynote']['fields'] as $f => $field_name) { ?>
102
					<tr>
103
						<td><?php echo wpsg_hspc($field_name); ?></td>
104
						<td>
105
							<input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['text']); ?>" />
106
						</td>
107
						<td>
108
							<input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['x']); ?>" />
109
						</td>
110
						<td>
111
							<input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['y']); ?>" />
112
						</td>
113
						<td>
114
							<input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['color']); ?>" />
115
						</td>
116
						<td>
117
							<select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
118
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
119
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
120
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
121
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
122
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
123
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
124
								<option <?php echo ((wpsg_getStr($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
125
							</select>
126
						</td>
127
						<td>
128
							<input type="checkbox" title="<?php echo __('Diese Checkbox aktivieren, damit die Textzeile verwendet wird.', 'wpsg'); ?>" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['wpsg_mod_deliverynote']['arTexte'][$f]['aktiv']))?'checked="checked"':''); ?> />
129
						</td>
130
					</tr>
131
				<?php } ?>
132
				</tbody>
2975 daniel 133
			</table>
5749 daniel 134
 
135
			<input class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;do=reset&amp;noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
136
 
7094 florian 137
			<br /><br />
5749 daniel 138
 
139
			<div class="info">
6496 thomas 140
				<p style="line-height:none;">
141
					<?php echo __('Die Angaben für X (Abstand von Links) und Y (Abstand von Oben) werden in mm eingetragen.', 'wpsg'); ?><br />
142
					<?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
143
				</p>
2975 daniel 144
			</div>
5749 daniel 145
 
2975 daniel 146
			<br />
5749 daniel 147
 
7094 florian 148
		</div>
149
		<div role="tabpanel" class="tab-pane" id="tab2">
5749 daniel 150
 
7094 florian 151
			<div id="foottext_list"><?php echo $this->view['foottext_list']; ?></div>
5749 daniel 152
 
7094 florian 153
			<br />
5749 daniel 154
 
7094 florian 155
			<a title="<?php echo __('Neue Fußzeile anlegen', 'wpsg'); ?>" href="" class="" onclick="return wpsg_addFooter();"><span class="glyphicon wpsg-glyphicon glyphicon-plus"></span><?php echo __('Neue Fußzeile anlegen.', 'wpsg'); ?></a>
5749 daniel 156
 
7094 florian 157
			<br /><br />
5749 daniel 158
 
159
			<div class="info">
6496 thomas 160
				<p style="line-height:none;">
161
					<?php echo __('Hier können Sie Texte vordefinieren, die sie unter den Lieferschein setzen können.', 'wpsg'); ?>
162
				</p>
2975 daniel 163
			</div>
5749 daniel 164
 
7094 florian 165
		</div>
166
		<div role="tabpanel" class="tab-pane" id="tab3">
5749 daniel 167
 
168
            <?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_nrformat', __('Format der Lieferscheinnummer', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_nrformat'), array('help' => 'wpsg_mod_deliverynote_nrformat')); ?>
2975 daniel 169
			<?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_nr', __('Start für Lieferscheinnummer', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_nr'), array('help' => 'wpsg_mod_deliverynote_nr')); ?>
5255 thomas 170
			<?php echo wpsg_drawForm_Input('wpsg_mod_deliverynote_url', __('URL Für URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_url'), array('help' => 'wpsg_mod_deliverynote_url')); ?>
171
			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_url_standard', __('URL Benachrichtigung standardmäßig aktiv', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_url_standard'), array('help' => 'wpsg_mod_deliverynote_url_standard')); ?>
7094 florian 172
 
5765 thomas 173
			<?php if ($this->hasMod('wpsg_mod_produktattribute') == '1') {?>
7094 florian 174
				<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_produktattribute', __('Produktattribute auf dem Lieferschein anzeigen', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_produktattribute'), array('help' => 'wpsg_mod_deliverynote_produktattribute')); ?>
5765 thomas 175
			<?php }?>
7094 florian 176
 
4923 thomas 177
			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverynote_hideCountry', __('Land auf Lieferschein verbergen', 'wpsg'), $this->get_option('wpsg_mod_deliverynote_hideCountry'), array('help' => 'wpsg_mod_deliverynote_hideCountry')); ?>
3748 daniel 178
			<?php echo wpsg_drawForm_Select('wpsg_mod_deliverynote_anr', __('Artikelnummer anzeigen', 'wpsg'), array(
179
				'0' => __('Nicht anzeigen', 'wpsg'),
180
				'1' => __('In Spalte "Nr." zeigen', 'wpsg'),
5749 daniel 181
				'2' => __('Als extra Zeile anzeigen', 'wpsg')
4923 thomas 182
			), $this->get_option('wpsg_mod_deliverynote_anr'), array('help' => 'wpsg_mod_deliverynote_anr')); ?>
5749 daniel 183
 
184
        </div>
7094 florian 185
	</div>
2975 daniel 186
</div>
187
 
188
<script type="text/javascript">/* <![CDATA[ */
189
 
190
	/**
7094 florian 191
	 * Stellt sicher, dass immer nur ein Button der align-buttons die highlight Klasse hat
192
	 */
193
	function handleLogoAlignClick(pressedEl)
194
	{
195
 
196
		if(pressedEl.hasClass("align-buttons-active")) return;
197
		else
198
		{
199
 
200
			pressedEl.addClass("align-buttons-active");
201
			pressedEl[0].value = pressedEl[0].value + " selected";
202
 
203
			jQuery.each($(".logo-align-button"), function(index, element) {
204
				if(element.classList.contains("align-buttons-active") && element !== pressedEl[0]){
205
 
206
					var values = element.value.split(" ");
207
					element.value = values[0];
208
 
209
					element.classList.remove("align-buttons-active");
210
 
211
					return false;
212
 
213
				}
214
			});
215
 
216
		}
217
 
218
	} // function handleLogoAlignClick()
219
 
220
	/**
221
	 * Wird beim Klicken auf den Vorschau Button ausgelöst
222
	 */
223
	function wpsg_deliverynote_preview()
224
	{
225
 
226
		let url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=orderAjax&noheader=1&wpsg_deliverynote_preview=1";
227
 
228
		window.open(url, '_blank');
229
 
230
		return false;
231
 
232
	} // function wpsg_rechnungen_preview()
233
 
234
	/**
2975 daniel 235
	 * Wird beim anlegen einer neuen Fußzeile aufgerufen
7094 florian 236
	 */
2975 daniel 237
	function wpsg_addFooter()
238
	{
7094 florian 239
 
2975 daniel 240
		jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
241
 
242
		jQuery.ajax( {
243
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=addFoottext&noheader=1',
244
			success: function(data) {
245
				jQuery('#foottext_list').html(data);
246
			}
247
		} );
7094 florian 248
 
2975 daniel 249
		return false;
7094 florian 250
 
2975 daniel 251
	} // function wpsg_addFooter()
252
 
253
	/**
254
	 * Wird beim entfernen einer Fußzeile aufgerufen
255
	 */
256
	function wpsg_removeFooter(foot_id)
257
	{
7094 florian 258
 
2975 daniel 259
		if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Fußzeile löschen möchten?', 'wpsg'); ?>')) return false;
260
 
261
		jQuery('#foottext_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
7094 florian 262
 
2975 daniel 263
		jQuery.ajax( {
264
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=removeFoottext&noheader=1',
265
			data: {
266
				foot_id: foot_id
267
			},
268
			success: function(data) {
269
				jQuery('#foottext_list').html(data);
270
			}
271
		} );
7094 florian 272
 
2975 daniel 273
		return false;
274
 
275
	} // function wpsg_removeFooter()
7094 florian 276
 
2975 daniel 277
	jQuery(document).ready(function() {
7094 florian 278
 
279
		jQuery('#wpsg_tab').wpsg_tab( {
2975 daniel 280
			'cookiename': 'wpsg_mod_deliverynote_tab',
281
			'tab2': function() {
282
				jQuery('.tablink').show();
283
			}
284
		} );
7094 florian 285
 
286
		jQuery(".wpsg_deliverynote_preview").click(function(){ wpsg_deliverynote_preview(); });
287
 
2975 daniel 288
	} );
289
 
7094 florian 290
	/* ]]> */</script>