1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Liste der Versandzonen
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
|
|
|
9 |
<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
|
|
|
10 |
<?php } else { ?>
|
5532 |
daniel |
11 |
<table class="table wpsg_table_vz">
|
6306 |
hartmut |
12 |
<thead>
|
1067 |
daniel |
13 |
<tr>
|
3506 |
daniel |
14 |
<th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
|
|
|
15 |
<th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
|
1067 |
daniel |
16 |
<th class="col_aktion"></th>
|
|
|
17 |
</tr>
|
6306 |
hartmut |
18 |
</thead>
|
|
|
19 |
<tbody>
|
1067 |
daniel |
20 |
<?php foreach ($this->view['data'] as $vz) { ?>
|
|
|
21 |
<tr>
|
2946 |
david |
22 |
<td class="wpsg_editable col_name">
|
3506 |
daniel |
23 |
<span id="vz_<?php echo $vz['id']; ?>_name" ><?php echo wpsg_hspc($vz['name']); ?></span>
|
|
|
24 |
<br />
|
5532 |
daniel |
25 |
<div id="vz_<?php echo $vz['id']; ?>_plz" style="display:none" class="wpsg_plz_div">
|
|
|
26 |
<textarea><?php echo wpsg_hspc($vz['param']); ?></textarea>
|
|
|
27 |
<input type="submit" class="button" name="wpsg_mod_vz_submitsave" value="<?php echo __('Speichern', 'wpsg'); ?>" onclick="return wpsg_savePLZ(<?php echo $vz['id']; ?>);" />
|
3506 |
daniel |
28 |
</div>
|
2946 |
david |
29 |
</td>
|
3506 |
daniel |
30 |
<td class="col_innereu">
|
|
|
31 |
<input class="wpsg_innereu" <?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
|
|
|
32 |
</td>
|
1067 |
daniel |
33 |
<td class="col_aktion">
|
5532 |
daniel |
34 |
|
|
|
35 |
<a class="wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);">[ PLZ ]</a>
|
|
|
36 |
<a class="glyphicon glyphicon-trash" href="#" title="<?php echo __('Versandzone löschen', 'wpsg'); ?>" onclick="return wpsg_removeVZ(<?php echo $vz['id']; ?>);"></a>
|
2952 |
david |
37 |
|
3506 |
daniel |
38 |
<script type="text/javascript">/* <![CDATA[ */
|
1068 |
daniel |
39 |
|
5934 |
hartmut |
40 |
jQuery('#vz_<?php echo $vz['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
|
1068 |
daniel |
41 |
submitdata: {
|
1067 |
daniel |
42 |
field: 'name',
|
|
|
43 |
vz_id: '<?php echo $vz['id']; ?>'
|
1068 |
daniel |
44 |
},
|
1587 |
daniel |
45 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
46 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
47 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
1067 |
daniel |
48 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
49 |
});
|
1068 |
daniel |
50 |
|
5934 |
hartmut |
51 |
jQuery('#vz_<?php echo $vz['id']; ?>_value').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
|
1068 |
daniel |
52 |
submitdata: {
|
1067 |
daniel |
53 |
field: 'value',
|
|
|
54 |
vz_id: '<?php echo $vz['id']; ?>'
|
1068 |
daniel |
55 |
},
|
1587 |
daniel |
56 |
submit : '<?php echo __('Speichern', 'wpsg'); ?>',
|
1068 |
daniel |
57 |
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
|
|
|
58 |
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
|
1067 |
daniel |
59 |
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
|
|
|
60 |
});
|
1068 |
daniel |
61 |
|
3506 |
daniel |
62 |
/* ]]> */</script>
|
1067 |
daniel |
63 |
</td>
|
|
|
64 |
</tr>
|
|
|
65 |
<?php } ?>
|
6306 |
hartmut |
66 |
</tbody>
|
1067 |
daniel |
67 |
</table>
|
3506 |
daniel |
68 |
|
|
|
69 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
70 |
|
|
|
71 |
jQuery(document).ready(function() {
|
|
|
72 |
|
|
|
73 |
jQuery('.wpsg_innereu').bind('click', function() {
|
|
|
74 |
|
|
|
75 |
var checked = "0"; if (jQuery(this).prop("checked")) checked = "1";
|
|
|
76 |
|
|
|
77 |
jQuery.ajax( {
|
|
|
78 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1',
|
|
|
79 |
data: {
|
|
|
80 |
field: 'innereu',
|
|
|
81 |
vz_id: jQuery(this).attr("id").substr(8),
|
|
|
82 |
value: checked
|
|
|
83 |
}
|
|
|
84 |
} );
|
|
|
85 |
|
|
|
86 |
} );
|
|
|
87 |
|
|
|
88 |
} );
|
|
|
89 |
|
|
|
90 |
/* ]]> */</script>
|
|
|
91 |
|
1067 |
daniel |
92 |
<?php } ?>
|