Subversion Repositories wpShopGermany4

Rev

Rev 5922 | Rev 6008 | 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>
5922 hartmut 27
			<td class="col1"><span class="wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></span></td>
28
			<td class="col2">
5454 daniel 29
				<select class="form-control" name="pflicht[custom][<?php echo $c_id; ?>][show]">
5439 daniel 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">
5454 daniel 36
				<select class="form-control" 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>
5454 daniel 42
			<td class="col4">
5439 daniel 43
 
5454 daniel 44
				<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-modal-window"></span></a>
45
 
46
				<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeCustomField(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
5439 daniel 47
 
5488 daniel 48
				<script type="text/javascript">/* <![CDATA[ */
1126 daniel 49
 
5934 hartmut 50
					jQuery('#kundenvariable_name_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
5439 daniel 51
						submitdata: {
52
				    		field: 'name',
53
				    		field_id: '<?php echo $c_id; ?>'
54
						},
55
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
56
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
57
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
58
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
59
					});
60
 
61
 
5488 daniel 62
					/* ]]> */</script>
5439 daniel 63
 
64
			</td>
65
		</tr>
5447 daniel 66
		<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 67
			<td class="col0"></td>
68
			<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
5454 daniel 69
			<td class="col234" colspan="3">
70
				<input type="text" class="form-control" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
5439 daniel 71
			</td>
72
		</tr>
73
		<?php } ?>
74
	</tbody>
75
</table>
76
 
1067 daniel 77
<br />
5439 daniel 78
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
1067 daniel 79
<?php } else { ?>
80
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
81
<?php } ?>