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