1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Verwaltung der Versandzonen
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
|
5532 |
daniel |
9 |
<div class="wpsg_admin_submenu">
|
|
|
10 |
|
|
|
11 |
<div class="list-group">
|
|
|
12 |
<span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
|
|
|
13 |
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
|
|
|
14 |
<a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
|
|
|
15 |
<?php } ?>
|
|
|
16 |
</div>
|
|
|
17 |
|
|
|
18 |
</div>
|
|
|
19 |
|
|
|
20 |
<div class="wpsg_admin_content form-horizontal">
|
|
|
21 |
|
|
|
22 |
<?php echo wpsg_drawForm_AdminboxStart(__('Versandzonen', 'wpsg')); ?>
|
|
|
23 |
|
|
|
24 |
<span id="wpsg_vz_list"><?php $this->view['adminController']->vz_listAction(); ?></span>
|
|
|
25 |
|
6306 |
hartmut |
26 |
<a href="#" onclick="return wpsg_addVZ();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neue Versandzone anlegen.', 'wpsg'); ?></a><br />
|
|
|
27 |
<br />
|
5532 |
daniel |
28 |
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Länderverwaltung', 'wpsg'); ?></a>
|
|
|
29 |
|
|
|
30 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
31 |
|
|
|
32 |
</div>
|
|
|
33 |
|
|
|
34 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
35 |
|
1067 |
daniel |
36 |
/**
|
6306 |
hartmut |
37 |
* Wird aufgerufen um einen neuen Satz hinzu zufügen und die Liste neu zu laden.
|
1067 |
daniel |
38 |
*/
|
|
|
39 |
function wpsg_addVZ()
|
|
|
40 |
{
|
|
|
41 |
|
6306 |
hartmut |
42 |
jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" /><br />');
|
1067 |
daniel |
43 |
|
|
|
44 |
jQuery.ajax( {
|
|
|
45 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=add&noheader=1',
|
|
|
46 |
success: function(data) {
|
|
|
47 |
jQuery('#wpsg_vz_list').html(data);
|
|
|
48 |
}
|
|
|
49 |
} );
|
|
|
50 |
|
|
|
51 |
return false;
|
|
|
52 |
|
|
|
53 |
} // function wpsg_addVZ()
|
|
|
54 |
|
|
|
55 |
/**
|
|
|
56 |
* Wird aufgerufen wenn eine Versandzone gelöscht werden soll
|
|
|
57 |
*/
|
|
|
58 |
function wpsg_removeVZ(vz_id)
|
|
|
59 |
{
|
|
|
60 |
|
6306 |
hartmut |
61 |
if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Versandzone löschen möchten?', 'wpsg'); ?>')) return false;
|
1067 |
daniel |
62 |
|
6306 |
hartmut |
63 |
jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" /><br />');
|
1067 |
daniel |
64 |
|
|
|
65 |
jQuery.ajax( {
|
|
|
66 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=remove&noheader=1',
|
|
|
67 |
data: {
|
|
|
68 |
vz_id: vz_id
|
|
|
69 |
},
|
|
|
70 |
success: function(data) {
|
|
|
71 |
jQuery('#wpsg_vz_list').html(data);
|
|
|
72 |
}
|
|
|
73 |
} );
|
|
|
74 |
|
|
|
75 |
return false;
|
|
|
76 |
|
|
|
77 |
} // function wpsg_removeVZ(vz_id)
|
|
|
78 |
|
2946 |
david |
79 |
function wpsg_editPLZ(vz_id)
|
|
|
80 |
{
|
|
|
81 |
jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:display');
|
|
|
82 |
|
|
|
83 |
return false;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
function wpsg_savePLZ(vz_id)
|
|
|
87 |
{
|
|
|
88 |
|
|
|
89 |
jQuery.ajax( {
|
|
|
90 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=save_plz&noheader=1',
|
|
|
91 |
data: {
|
|
|
92 |
vz_id: vz_id,
|
2949 |
daniel |
93 |
textarea: jQuery('#vz_' + vz_id + '_plz textarea').val()
|
2946 |
david |
94 |
},
|
|
|
95 |
success: function(data) {
|
2949 |
daniel |
96 |
jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:none');
|
2946 |
david |
97 |
}
|
|
|
98 |
} );
|
|
|
99 |
|
|
|
100 |
return false;
|
2949 |
daniel |
101 |
|
2946 |
david |
102 |
}
|
|
|
103 |
|
2656 |
daniel |
104 |
function wpsg_loadStandard()
|
|
|
105 |
{
|
|
|
106 |
|
|
|
107 |
if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie die Standard Versandzonen und Länder laden möchten? Die alten Versandzonen und Länder gehen verloren.', 'wpsg'); ?>')) return false;
|
|
|
108 |
|
|
|
109 |
jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
|
|
110 |
|
|
|
111 |
jQuery.ajax( {
|
|
|
112 |
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=loadStandard&noheader=1',
|
|
|
113 |
success: function(data) {
|
|
|
114 |
jQuery('#wpsg_vz_list').html(data);
|
|
|
115 |
}
|
|
|
116 |
} );
|
|
|
117 |
|
|
|
118 |
return false;
|
|
|
119 |
|
|
|
120 |
} // function wpsg_loadStandard()
|
|
|
121 |
|
5532 |
daniel |
122 |
/* ]]> */</script>
|