1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die erweiteren Kundendaten
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
4194 |
daniel |
8 |
<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
|
1126 |
daniel |
9 |
|
|
|
10 |
<script type="text/javascript">
|
|
|
11 |
|
|
|
12 |
/**
|
|
|
13 |
* Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
|
|
|
14 |
*/
|
1606 |
daniel |
15 |
function wpsg_genKVCode(kv_id)
|
1126 |
daniel |
16 |
{
|
1606 |
daniel |
17 |
|
|
|
18 |
jQuery("#wpsg_kv_code_dialog").dialog( {
|
1126 |
daniel |
19 |
'dialogClass': 'wp-dialog',
|
|
|
20 |
'modal': true,
|
1667 |
daniel |
21 |
'width': 700,
|
|
|
22 |
'height': 300,
|
1126 |
daniel |
23 |
'title': '<?php echo __('HTML Code Block', 'wpsg'); ?>',
|
|
|
24 |
open: function(event, ui) {
|
|
|
25 |
|
1606 |
daniel |
26 |
jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
27 |
|
1126 |
daniel |
28 |
jQuery.ajax( {
|
1606 |
daniel |
29 |
url: 'admin.php?page=wpsg-Admin&subaction=kundendaten&noheader=1&show=code',
|
1126 |
daniel |
30 |
data: {
|
1606 |
daniel |
31 |
'kv_id': kv_id
|
1126 |
daniel |
32 |
},
|
|
|
33 |
success: function(data)
|
|
|
34 |
{
|
1606 |
daniel |
35 |
|
|
|
36 |
jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html(data);
|
1594 |
david |
37 |
|
1126 |
daniel |
38 |
}
|
|
|
39 |
} );
|
|
|
40 |
|
|
|
41 |
}
|
|
|
42 |
} );
|
|
|
43 |
|
|
|
44 |
return false;
|
|
|
45 |
|
|
|
46 |
} // function wpsg_genPACode(pa_id)
|
|
|
47 |
|
|
|
48 |
</script>
|
|
|
49 |
|
1606 |
daniel |
50 |
<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
|
1594 |
david |
51 |
|
1067 |
daniel |
52 |
<table class="wpsg_customfields">
|
|
|
53 |
<tr>
|
3227 |
daniel |
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">
|
1067 |
daniel |
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>
|
3227 |
daniel |
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">
|
1067 |
daniel |
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>
|
3227 |
daniel |
74 |
<td class="col3">
|
1067 |
daniel |
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>
|
3227 |
daniel |
81 |
<td class="col4">
|
1126 |
daniel |
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>
|
3227 |
daniel |
84 |
<td class="col5">
|
1067 |
daniel |
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', {
|
1068 |
daniel |
90 |
submitdata: {
|
1067 |
daniel |
91 |
field: 'name',
|
1126 |
daniel |
92 |
field_id: '<?php echo $c_id; ?>'
|
1068 |
daniel |
93 |
},
|
1587 |
daniel |
94 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
95 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
96 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
1067 |
daniel |
97 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
1068 |
daniel |
98 |
});
|
1067 |
daniel |
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;'); ?>">
|
3227 |
daniel |
105 |
<td class="col0"></td>
|
|
|
106 |
<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
|
|
|
107 |
<td class="col2345" colspan="4">
|
1067 |
daniel |
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 />
|
1403 |
daniel |
114 |
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show')); ?>
|
1067 |
daniel |
115 |
<?php } else { ?>
|
|
|
116 |
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
|
|
|
117 |
<?php } ?>
|