1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Länderverwaltung
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<div class="wpsg_admin_submenu">
|
|
|
9 |
|
5455 |
thomas |
10 |
<div class="list-group">
|
|
|
11 |
<span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
|
|
|
12 |
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
|
|
|
13 |
<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>
|
1067 |
daniel |
14 |
<?php } ?>
|
5455 |
thomas |
15 |
</div>
|
1067 |
daniel |
16 |
|
|
|
17 |
</div>
|
|
|
18 |
|
5562 |
daniel |
19 |
<div class="modal fade" id="Modal_wpsg_country_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
|
|
20 |
<div class="modal-dialog" role="document">
|
|
|
21 |
<div class="modal-content">
|
|
|
22 |
<div class="modal-header">
|
|
|
23 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
24 |
<h4 class="modal-title" id="myModalLabel"><?php echo __('Land anlegen/bearbeiten', 'wpsg'); ?></h4>
|
|
|
25 |
</div>
|
|
|
26 |
<div class="modal-body">
|
|
|
27 |
|
|
|
28 |
</div>
|
|
|
29 |
<div class="modal-footer">
|
|
|
30 |
<button type="button" class="btn btn-default" onclick="return wpsg_country_save();" data-dismiss="modal"><?php echo __('Speichern und schließen', 'wpsg'); ?></button>
|
|
|
31 |
</div>
|
|
|
32 |
</div>
|
|
|
33 |
</div>
|
|
|
34 |
</div>
|
|
|
35 |
|
1067 |
daniel |
36 |
<div class="wpsg_admin_content">
|
4057 |
daniel |
37 |
|
5562 |
daniel |
38 |
<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&noheader=1'); ?>">
|
|
|
39 |
|
7560 |
daniel |
40 |
<?php echo wp_nonce_field('wpsg-admin-laender'); ?>
|
|
|
41 |
|
5562 |
daniel |
42 |
<?php echo wpsg_drawForm_AdminboxStart(__('Länderverwaltung', 'wpsg')); ?>
|
|
|
43 |
|
|
|
44 |
<div id="wpsg_country_list">
|
|
|
45 |
|
5748 |
daniel |
46 |
<?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_list.phtml'); ?>
|
5562 |
daniel |
47 |
|
|
|
48 |
</div>
|
|
|
49 |
|
|
|
50 |
<br />
|
|
|
51 |
|
|
|
52 |
</form>
|
|
|
53 |
|
5748 |
daniel |
54 |
<a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br />
|
5825 |
daniel |
55 |
<a href="#" onclick="return wpsg_country_import();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><?php echo __('Standardländer importieren.', 'wpsg'); ?></a><br />
|
|
|
56 |
<a href="#" onclick="return wpsg_country_importEU();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><?php echo __('EU-Länder importieren.', 'wpsg'); ?></a><br />
|
5748 |
daniel |
57 |
|
|
|
58 |
<br />
|
|
|
59 |
|
|
|
60 |
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Versandzonenverwaltung', 'wpsg'); ?></a>
|
5532 |
daniel |
61 |
|
|
|
62 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
63 |
|
5562 |
daniel |
64 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
65 |
|
|
|
66 |
function wpsg_country_check_all() { jQuery('td.col_check input').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } ); }
|
|
|
67 |
|
7560 |
daniel |
68 |
function wpsg_country_remove(land_id) {
|
6306 |
hartmut |
69 |
|
|
|
70 |
if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
|
|
|
71 |
|
|
|
72 |
jQuery.ajax( {
|
7560 |
daniel |
73 |
url: '<?php
|
|
|
74 |
|
|
|
75 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=remove&noheader=1', 'wpsg-laender-delete'));
|
|
|
76 |
|
|
|
77 |
?>',
|
6306 |
hartmut |
78 |
data: {
|
|
|
79 |
land_id: land_id
|
|
|
80 |
},
|
|
|
81 |
success: function(data) {
|
|
|
82 |
|
|
|
83 |
if (data === "1") jQuery('#wpsg_laenderrow_' + land_id).remove();
|
|
|
84 |
else alert(data);
|
|
|
85 |
|
|
|
86 |
}
|
|
|
87 |
} );
|
|
|
88 |
|
|
|
89 |
return false;
|
|
|
90 |
|
|
|
91 |
}
|
|
|
92 |
|
5562 |
daniel |
93 |
function wpsg_country_add()
|
|
|
94 |
{
|
|
|
95 |
|
|
|
96 |
jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
|
|
|
97 |
jQuery('#Modal_wpsg_country_edit').modal('show');
|
|
|
98 |
|
|
|
99 |
jQuery.ajax( {
|
7560 |
daniel |
100 |
url: '<?php
|
|
|
101 |
|
|
|
102 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=add&noheader=1', 'wpsg-laender-add'));
|
|
|
103 |
|
|
|
104 |
?>',
|
5562 |
daniel |
105 |
success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
|
|
|
106 |
} );
|
|
|
107 |
|
|
|
108 |
return false;
|
|
|
109 |
|
|
|
110 |
} // function wpsg_country_add()
|
|
|
111 |
|
7560 |
daniel |
112 |
function wpsg_country_import() {
|
5748 |
daniel |
113 |
|
|
|
114 |
if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
|
|
|
115 |
|
|
|
116 |
jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
|
|
|
117 |
|
|
|
118 |
jQuery.ajax( {
|
7560 |
daniel |
119 |
url: '<?php
|
|
|
120 |
|
|
|
121 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1', 'wpsg-laender-import'));
|
|
|
122 |
|
|
|
123 |
?>',
|
5748 |
daniel |
124 |
success: function(data) {
|
|
|
125 |
|
|
|
126 |
jQuery('#wpsg_country_list').html(data);
|
|
|
127 |
|
|
|
128 |
}
|
|
|
129 |
} );
|
|
|
130 |
|
|
|
131 |
return false;
|
|
|
132 |
|
|
|
133 |
} // function wpsg_country_import()
|
|
|
134 |
|
|
|
135 |
function wpsg_country_importEU()
|
|
|
136 |
{
|
|
|
137 |
|
|
|
138 |
if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
|
|
|
139 |
|
|
|
140 |
jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
|
|
|
141 |
|
|
|
142 |
jQuery.ajax( {
|
7560 |
daniel |
143 |
url: '<?php
|
|
|
144 |
|
|
|
145 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1', 'wpsg-laender-eu_import'));
|
|
|
146 |
|
|
|
147 |
?>',
|
5748 |
daniel |
148 |
success: function(data) {
|
|
|
149 |
|
|
|
150 |
jQuery('#wpsg_country_list').html(data);
|
|
|
151 |
|
|
|
152 |
}
|
|
|
153 |
} );
|
|
|
154 |
|
|
|
155 |
return false;
|
|
|
156 |
|
|
|
157 |
} // function wpsg_country_importEU()
|
|
|
158 |
|
5562 |
daniel |
159 |
function wpsg_country_save()
|
|
|
160 |
{
|
|
|
161 |
|
|
|
162 |
jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
|
|
|
163 |
|
|
|
164 |
jQuery.ajax( {
|
7560 |
daniel |
165 |
url: '<?php
|
|
|
166 |
|
|
|
167 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=save&noheader=1', 'wpsg-laender-save'));
|
|
|
168 |
|
|
|
169 |
?>',
|
5562 |
daniel |
170 |
data: {
|
|
|
171 |
form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
|
|
|
172 |
},
|
|
|
173 |
success: function(data) {
|
|
|
174 |
|
|
|
175 |
jQuery('#wpsg_country_list').html(data);
|
|
|
176 |
|
|
|
177 |
}
|
|
|
178 |
} );
|
|
|
179 |
|
|
|
180 |
} // function wpsg_country_save()
|
|
|
181 |
|
|
|
182 |
function wpsg_country_edit(land_id)
|
|
|
183 |
{
|
|
|
184 |
|
|
|
185 |
jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
|
|
|
186 |
jQuery('#Modal_wpsg_country_edit').modal('show');
|
|
|
187 |
|
|
|
188 |
jQuery.ajax( {
|
7560 |
daniel |
189 |
url: '<?php
|
|
|
190 |
|
|
|
191 |
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1', 'wpsg-laender-edit'));
|
|
|
192 |
|
|
|
193 |
?>',
|
|
|
194 |
data: {
|
|
|
195 |
land_id: land_id
|
|
|
196 |
},
|
5562 |
daniel |
197 |
success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
|
|
|
198 |
} );
|
|
|
199 |
|
|
|
200 |
return false;
|
|
|
201 |
|
|
|
202 |
} // function wpsg_country_edit(edit_id)
|
|
|
203 |
|
|
|
204 |
/* ]]> */</script>
|
|
|
205 |
|
1067 |
daniel |
206 |
</div>
|