Subversion Repositories wpShopGermany4

Rev

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