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>
|
6008 |
hartmut |
24 |
<?php
|
|
|
25 |
$arShow = array('0' => __('Ja', 'wpsg'), '1' => __('Nein', 'wpsg'), '2' => __('Nicht zeigen', 'wpsg'));
|
|
|
26 |
$arTyp = array('0' => __('Textfeld', 'wpsg'), '1' => __('Auswahlfeld', 'wpsg'), '2' => __('Checkbox', 'wpsg'));
|
|
|
27 |
foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
|
5439 |
daniel |
28 |
<tr class="wpsg_customervar_row_<?php echo $c_id; ?>">
|
|
|
29 |
<td class="col0"><?php echo $c_id; ?></td>
|
5922 |
hartmut |
30 |
<td class="col1"><span class="wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></span></td>
|
|
|
31 |
<td class="col2">
|
6008 |
hartmut |
32 |
<span id="kundenvariable_show_<?php echo $c_id; ?>"><?php echo $arShow[$c['show']]; ?></span>
|
|
|
33 |
|
5439 |
daniel |
34 |
</td>
|
|
|
35 |
<td class="col3">
|
6008 |
hartmut |
36 |
<span id="kundenvariable_typ_<?php echo $c_id; ?>"><?php echo $arTyp[$c['typ']]; ?></span>
|
5439 |
daniel |
37 |
</td>
|
5454 |
daniel |
38 |
<td class="col4">
|
5439 |
daniel |
39 |
|
5454 |
daniel |
40 |
<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>
|
|
|
41 |
|
|
|
42 |
<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 |
43 |
|
5488 |
daniel |
44 |
<script type="text/javascript">/* <![CDATA[ */
|
1126 |
daniel |
45 |
|
6008 |
hartmut |
46 |
jQuery(document).ready(function() {
|
|
|
47 |
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', {
|
|
|
48 |
submitdata: {
|
|
|
49 |
field: 'name',
|
|
|
50 |
field_id: '<?php echo $c_id; ?>'
|
|
|
51 |
},
|
|
|
52 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
|
|
53 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
54 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
55 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
56 |
});
|
5439 |
daniel |
57 |
|
6008 |
hartmut |
58 |
jQuery('#kundenvariable_show_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
|
|
|
59 |
submitdata: {
|
|
|
60 |
field: 'show',
|
|
|
61 |
field_id: '<?php echo $c_id; ?>'
|
|
|
62 |
},
|
|
|
63 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
|
|
64 |
data: <?php echo wpsg_prepare_for_inlineEdit(array('0' => __('Ja', 'wpsg'), '1' => __('Nein', 'wpsg'), '2' => __('Nicht zeigen', 'wpsg'))); ?>,
|
|
|
65 |
type: 'select',
|
|
|
66 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
67 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
68 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
69 |
callback: function(el) {
|
|
|
70 |
if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
|
|
|
71 |
{
|
|
|
72 |
jQuery('#row_auswahl_<?php echo $c_id; ?>').show();
|
|
|
73 |
}
|
|
|
74 |
else
|
|
|
75 |
{
|
|
|
76 |
jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();
|
|
|
77 |
}
|
|
|
78 |
}
|
|
|
79 |
});
|
|
|
80 |
|
|
|
81 |
jQuery('#kundenvariable_typ_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
|
|
|
82 |
submitdata: {
|
|
|
83 |
field: 'typ',
|
|
|
84 |
field_id: '<?php echo $c_id; ?>'
|
|
|
85 |
},
|
|
|
86 |
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
|
|
|
87 |
data: <?php echo wpsg_prepare_for_inlineEdit(array('0' => __('Textfeld', 'wpsg'), '1' => __('Auswahlfeld', 'wpsg'), '2' => __('Checkbox', 'wpsg'))); ?>,
|
|
|
88 |
type: 'select',
|
|
|
89 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
90 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
91 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
92 |
callback: function(el) {
|
7900 |
daniel |
93 |
|
|
|
94 |
if (el == '1') {
|
|
|
95 |
|
6008 |
hartmut |
96 |
jQuery('#row_auswahl_<?php echo $c_id; ?>').show();
|
7900 |
daniel |
97 |
|
|
|
98 |
} else {
|
|
|
99 |
|
6008 |
hartmut |
100 |
jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();
|
7900 |
daniel |
101 |
|
6008 |
hartmut |
102 |
}
|
7900 |
daniel |
103 |
|
6008 |
hartmut |
104 |
}
|
|
|
105 |
});
|
5439 |
daniel |
106 |
|
6008 |
hartmut |
107 |
jQuery('#kundenvariable_auswahl_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
|
|
|
108 |
submitdata: {
|
|
|
109 |
field: 'auswahl',
|
|
|
110 |
field_id: '<?php echo $c_id; ?>'
|
|
|
111 |
},
|
|
|
112 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
|
|
113 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
114 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
|
|
115 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
116 |
});
|
|
|
117 |
|
|
|
118 |
} );
|
|
|
119 |
|
|
|
120 |
/* ]]> */</script>
|
5439 |
daniel |
121 |
|
|
|
122 |
</td>
|
|
|
123 |
</tr>
|
5447 |
daniel |
124 |
<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 |
125 |
<td class="col0"></td>
|
|
|
126 |
<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
|
5454 |
daniel |
127 |
<td class="col234" colspan="3">
|
6008 |
hartmut |
128 |
<span class="wpsg_editable editable editable-click" id="kundenvariable_auswahl_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['auswahl']); ?></span>
|
5439 |
daniel |
129 |
</td>
|
|
|
130 |
</tr>
|
|
|
131 |
<?php } ?>
|
|
|
132 |
</tbody>
|
|
|
133 |
</table>
|
|
|
134 |
|
1067 |
daniel |
135 |
<br />
|
5439 |
daniel |
136 |
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
|
1067 |
daniel |
137 |
<?php } else { ?>
|
|
|
138 |
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
|
|
|
139 |
<?php } ?>
|