Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die erweiteren Kundendaten
5
	 */
6
 
7
?>
5439 daniel 8
 
4194 daniel 9
<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
5439 daniel 10
<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
1126 daniel 11
 
5439 daniel 12
<table class="wpsg_customfields table">
13
	<thead>
14
		<tr>
15
			<th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
16
			<th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
17
			<th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
18
			<th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
19
			<th class="col4"></th>
5447 daniel 20
			<th class="col5"></th>
5439 daniel 21
		</tr>
22
	</thead>
23
	<tbody>
24
		<?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
25
		<tr class="wpsg_customervar_row_<?php echo $c_id; ?>">
26
			<td class="col0"><?php echo $c_id; ?></td>
27
			<td class="col2"><span class="wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></span></td>
28
			<td class="col3">
29
				<select class="form-control wpsg-sm" name="pflicht[custom][<?php echo $c_id; ?>][show]">
30
					<option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
31
					<option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
32
					<option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
33
				</select>
34
			</td>
35
			<td class="col3">
5447 daniel 36
				<select class="form-control wpsg-sm" onchange="if (jQuery(this).val() == '1') { jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); jQuery('#row_auswahl_<?php echo $c_id; ?> input').first().focus(); } else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
5439 daniel 37
					<option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
38
					<option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
39
					<option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
40
				</select>
41
			</td>
42
			<td class="col4">
43
				<a href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-modal-window"></span></a>
44
			</td>
45
			<td class="col5">
46
 
47
				<a href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeCustomField(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
48
 
49
				<script type="text/javascript">
1126 daniel 50
 
5439 daniel 51
					jQuery('#kundenvariable_name_<?php echo $c_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
52
						submitdata: {
53
				    		field: 'name',
54
				    		field_id: '<?php echo $c_id; ?>'
55
						},
56
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
57
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
58
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
59
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
60
					});
61
 
62
 
63
				</script>
64
 
65
			</td>
66
		</tr>
5447 daniel 67
		<tr class="wpsg_customervar_row2 wpsg_customervar_row_<?php echo $c_id; ?>" id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
5439 daniel 68
			<td class="col0"></td>
69
			<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
70
			<td class="col2345" colspan="4">
71
				<input type="text" class="form-control wpsg-sm" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
72
			</td>
73
		</tr>
74
		<?php } ?>
75
	</tbody>
76
</table>
77
 
1067 daniel 78
<br />
5439 daniel 79
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
1067 daniel 80
<?php } else { ?>
81
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
82
<?php } ?>