Line 3... |
Line 3... |
3 |
/**
|
3 |
/**
|
4 |
* Template für die erweiteren Kundendaten
|
4 |
* Template für die erweiteren Kundendaten
|
5 |
*/
|
5 |
*/
|
6 |
|
6 |
|
7 |
?>
|
7 |
?>
|
- |
|
8 |
|
8 |
<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
|
9 |
<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
|
- |
|
10 |
<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
|
- |
|
11 |
|
- |
|
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>
|
- |
|
20 |
<th class="col5">
|
- |
|
21 |
<a href="#" title="<?php echo __('Neue Kundenvariable anlegen', 'wpsg'); ?>" onclick="return wpsg_addCustomField();" class="customer_variable_add"><span class="glyphicon glyphicon-plus"></span></a>
|
- |
|
22 |
</th>
|
- |
|
23 |
</tr>
|
- |
|
24 |
</thead>
|
- |
|
25 |
<tbody>
|
- |
|
26 |
<?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
|
- |
|
27 |
<tr class="wpsg_customervar_row_<?php echo $c_id; ?>">
|
- |
|
28 |
<td class="col0"><?php echo $c_id; ?></td>
|
- |
|
29 |
<td class="col2"><span class="wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></span></td>
|
- |
|
30 |
<td class="col3">
|
- |
|
31 |
<select class="form-control wpsg-sm" name="pflicht[custom][<?php echo $c_id; ?>][show]">
|
- |
|
32 |
<option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
|
- |
|
33 |
<option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
|
- |
|
34 |
<option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
|
- |
|
35 |
</select>
|
- |
|
36 |
</td>
|
- |
|
37 |
<td class="col3">
|
- |
|
38 |
<select class="form-control wpsg-sm" onchange="if (jQuery(this).val() == '1') jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
|
- |
|
39 |
<option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
|
- |
|
40 |
<option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
|
- |
|
41 |
<option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
|
- |
|
42 |
</select>
|
- |
|
43 |
</td>
|
- |
|
44 |
<td class="col4">
|
- |
|
45 |
<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>
|
- |
|
46 |
</td>
|
- |
|
47 |
<td class="col5">
|
- |
|
48 |
|
- |
|
49 |
<a href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeCustomField(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
|
- |
|
50 |
|
- |
|
51 |
<script type="text/javascript">
|
- |
|
52 |
|
- |
|
53 |
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', {
|
- |
|
54 |
submitdata: {
|
- |
|
55 |
field: 'name',
|
- |
|
56 |
field_id: '<?php echo $c_id; ?>'
|
- |
|
57 |
},
|
- |
|
58 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
- |
|
59 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
- |
|
60 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
- |
|
61 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
- |
|
62 |
});
|
- |
|
63 |
|
- |
|
64 |
|
- |
|
65 |
</script>
|
- |
|
66 |
|
- |
|
67 |
</td>
|
- |
|
68 |
</tr>
|
- |
|
69 |
<tr class="wpsg_customervar_row_<?php echo $c_id; ?>" id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
|
- |
|
70 |
<td class="col0"></td>
|
- |
|
71 |
<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
|
- |
|
72 |
<td class="col2345" colspan="4">
|
- |
|
73 |
<input type="text" class="form-control wpsg-sm" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
|
- |
|
74 |
</td>
|
- |
|
75 |
</tr>
|
- |
|
76 |
<?php } ?>
|
- |
|
77 |
</tbody>
|
- |
|
78 |
</table>
|
- |
|
79 |
|
9 |
|
80 |
|
10 |
<script type="text/javascript">
|
81 |
<script type="text/javascript">/* <![CDATA[ */
|
11 |
|
82 |
|
12 |
/**
|
83 |
/**
|
13 |
* Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
|
84 |
* Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
|
14 |
*/
|
85 |
*/
|
15 |
function wpsg_genKVCode(kv_id)
|
86 |
function wpsg_genKVCode(kv_id)
|
Line 43... |
Line 114... |
43 |
|
114 |
|
44 |
return false;
|
115 |
return false;
|
45 |
|
116 |
|
46 |
} // function wpsg_genPACode(pa_id)
|
117 |
} // function wpsg_genPACode(pa_id)
|
47 |
|
118 |
|
48 |
</script>
|
119 |
/* ]]> */</script>
|
49 |
|
120 |
|
50 |
<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
|
- |
|
51 |
|
- |
|
52 |
<table class="wpsg_customfields">
|
- |
|
53 |
<tr>
|
- |
|
54 |
<th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
|
- |
|
55 |
<th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
|
- |
|
56 |
<th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
|
- |
|
57 |
<th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
|
- |
|
58 |
<th class="col4"></th>
|
- |
|
59 |
<th class="col5">
|
- |
|
60 |
<a class="wpsg_icon wpsg_icon_center wpsg_icon_remove" href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return false;"></a>
|
- |
|
61 |
</th>
|
- |
|
62 |
</tr>
|
- |
|
63 |
<?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
|
- |
|
64 |
<tr>
|
- |
|
65 |
<td class="col0"><?php echo $c_id; ?></td>
|
- |
|
66 |
<td class="col2 wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></td>
|
- |
|
67 |
<td class="col3">
|
- |
|
68 |
<select name="pflicht[custom][<?php echo $c_id; ?>][show]">
|
- |
|
69 |
<option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
|
- |
|
70 |
<option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
|
- |
|
71 |
<option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
|
- |
|
72 |
</select>
|
- |
|
73 |
</td>
|
- |
|
74 |
<td class="col3">
|
- |
|
75 |
<select onchange="if (jQuery(this).val() == '1') jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
|
- |
|
76 |
<option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
|
- |
|
77 |
<option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
|
- |
|
78 |
<option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
|
- |
|
79 |
</select>
|
- |
|
80 |
</td>
|
- |
|
81 |
<td class="col4">
|
- |
|
82 |
<a class="wpsg_icon wpsg_icon_html wpsg_icon_center" href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"></a>
|
- |
|
83 |
</td>
|
- |
|
84 |
<td class="col5">
|
- |
|
85 |
<input type="checkbox" value="1" name="pflicht[custom][<?php echo $c_id; ?>][del]" />
|
- |
|
86 |
|
- |
|
87 |
<script type="text/javascript">
|
- |
|
88 |
|
- |
|
89 |
jQuery('#kundenvariable_name_<?php echo $c_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
|
- |
|
90 |
submitdata: {
|
- |
|
91 |
field: 'name',
|
- |
|
92 |
field_id: '<?php echo $c_id; ?>'
|
- |
|
93 |
},
|
- |
|
94 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
- |
|
95 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
- |
|
96 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
- |
|
97 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
- |
|
98 |
});
|
- |
|
99 |
|
- |
|
100 |
</script>
|
- |
|
101 |
|
- |
|
102 |
</td>
|
- |
|
103 |
</tr>
|
- |
|
104 |
<tr id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
|
- |
|
105 |
<td class="col0"></td>
|
- |
|
106 |
<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
|
- |
|
107 |
<td class="col2345" colspan="4">
|
- |
|
108 |
<input type="text" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
|
- |
|
109 |
</td>
|
- |
|
110 |
</tr>
|
- |
|
111 |
<?php } ?>
|
- |
|
112 |
</table>
|
- |
|
113 |
<br />
|
121 |
<br />
|
114 |
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show')); ?>
|
122 |
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
|
115 |
<?php } else { ?>
|
123 |
<?php } else { ?>
|
116 |
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
|
124 |
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
|
117 |
<?php } ?>
|
125 |
<?php } ?>
|
118 |
|
126 |
|