summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-09-09 20:05:19 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-09-09 20:05:19 +0000
commiteaf11126b7c5a763dc70701ddf205ffe30676ef6 (patch)
tree4b0233776429bec7b40ef893f06fc072f0b0e70d /views
parentc5ef7d3ea5ccf16f33ce419c455b0a1b1172e5cd (diff)
- Fertigstellung neue Länderverwaltung
- Deinstallationsoptionen an Layout angepasst - Bestellvariablen löschen - Backend Kleinigkeiten git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5748 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
-rw-r--r--views/admin/deinstall.phtml48
-rw-r--r--views/admin/form/input.phtml23
-rw-r--r--views/admin/form/select.phtml23
-rw-r--r--views/admin/konfiguration.phtml30
-rw-r--r--views/admin/laender.phtml338
-rw-r--r--views/admin/laender_edit.phtml6
-rw-r--r--views/admin/laender_list.phtml87
-rw-r--r--views/css/admin.css2
-rw-r--r--views/mods/mod_ordervars/ov_list.phtml25
9 files changed, 241 insertions, 341 deletions
diff --git a/views/admin/deinstall.phtml b/views/admin/deinstall.phtml
index ac760f7..f90c135 100644
--- a/views/admin/deinstall.phtml
+++ b/views/admin/deinstall.phtml
@@ -17,40 +17,36 @@
</div>
<div class="wpsg_admin_content">
-
- <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
-
+
+ <?php echo wpsg_drawForm_AdminboxStart(__('Datensätze löschen / Plugin deinstallieren', 'wpsg')); ?>
+
+ <form name="form1" class="form-horizontal" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
<p><?php echo __('Bitte wählen Sie aus, was Sie entfernen möchten?', 'wpsg'); ?></p>
-
- <label>
- <input type="checkbox" value="1" name="wpsg_deinstall_products" />&nbsp;<?php echo wpsg_translate(__('Produkte (#1# Datensätze)', 'wpsg'), (($this->view['count_products'] > 0)?$this->view['count_products']:0)); ?>
- </label><br />
- <label>
- <input type="checkbox" value="1" name="wpsg_deinstall_customer" />&nbsp;<?php echo wpsg_translate(__('Kunden (#1# Datensätze)', 'wpsg'), (($this->view['count_customer'] > 0)?$this->view['count_customer']:0)); ?>
- </label><br />
- <label>
- <input type="checkbox" value="1" name="wpsg_deinstall_order" />&nbsp;<?php echo wpsg_translate(__('Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order'] > 0)?$this->view['count_order']:0)); ?>
- </label><br />
- <label>
- <input type="checkbox" value="1" name="wpsg_deinstall_incompleteorder" />&nbsp;<?php echo wpsg_translate(__('Unvollständige Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order_incomplete'] > 0)?$this->view['count_order_incomplete']:0)); ?>
- </label><br />
-
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_deinstall_products', wpsg_translate(__('Produkte (#1# Datensätze)', 'wpsg'), (($this->view['count_products'] > 0)?$this->view['count_products']:0)), false, array('fullWidth' => true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_deinstall_customer', wpsg_translate(__('Kunden (#1# Datensätze)', 'wpsg'), (($this->view['count_customer'] > 0)?$this->view['count_customer']:0)), false, array('fullWidth' => true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_deinstall_order', wpsg_translate(__('Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order'] > 0)?$this->view['count_order']:0)), false, array('fullWidth' => true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_deinstall_incompleteorder', wpsg_translate(__('Unvollständige Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order_incomplete'] > 0)?$this->view['count_order_incomplete']:0)), false, array('fullWidth' => true)); ?>
+
<br />
- <label>
- <input type="checkbox" value="1" name="wpsg_deinstall_core" />&nbsp;<?php echo __('Plugin, Programmdateien, Moduldateien und Datenbanktabellen', 'wpsg'); ?>
- </label>
-
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_deinstall_core', __('Plugin, Programmdateien, Moduldateien und Datenbanktabellen', 'wpsg'), false, array('fullWidth' => true)); ?>
+
<p class="submit"><input onclick="return wpsg_check_deinstall();" type="submit" value="<?php echo __('Deinstallation durchführen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
-
+
<div class="wpsg_hinweis">
- <?php echo __('Hinweis: Es werden hier auch bereits gelöschte Datensätze angezeigt, da diese noch im System hinterlegt bleiben.', 'wpsg'); ?><br /><br />
+ <?php echo __('Hinweis: Es werden hier auch bereits gelöschte Datensätze angezeigt/gezählt, da diese noch im System hinterlegt bleiben.', 'wpsg'); ?><br /><br />
<strong><?php echo __('Das Deinstallieren ist aber nicht umkehrbar!', 'wpsg'); ?></strong>
</div>
-
+
</form>
+
+ <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
</div>
-<script type="text/javascript">
+<script type="text/javascript">/* <![CDATA[ */
function wpsg_check_deinstall()
{
@@ -73,4 +69,4 @@
} // function wpsg_check_deinstall()
-</script> \ No newline at end of file
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/admin/form/input.phtml b/views/admin/form/input.phtml
index aad0896..3a936a6 100644
--- a/views/admin/form/input.phtml
+++ b/views/admin/form/input.phtml
@@ -8,8 +8,27 @@
<input
type="text"
class="form-control input-sm"
- name="<?php echo $this->view['field_name']; ?>"
- value="<?php echo wpsg_hspc($this->view['field_value']); ?>"
+ name="<?php echo $this->view['field_name']; ?>"
+ autofocus="true"
+ tabindex="<?php
+
+ if (!isset($GLOBALS['wpsg']['tabindex']))
+ {
+
+ $GLOBALS['wpsg']['tabindex'] = 10;
+
+ }
+ else
+ {
+
+ $GLOBALS['wpsg']['tabindex'] += 10;
+
+ }
+
+ echo $GLOBALS['wpsg']['tabindex'];
+
+ ?>"
+ value="<?php echo wpsg_hspc($this->view['field_value']); ?>"
id="<?php echo $this->view['field_id']; ?>"
placeholder="<?php echo wpsg_getStr($this->view['field_config']['placeholder']); ?>"
<?php if (wpsg_isTrue($this->view['field_config']['readonly'])) { ?>
diff --git a/views/admin/form/select.phtml b/views/admin/form/select.phtml
index f0466c8..34993d0 100644
--- a/views/admin/form/select.phtml
+++ b/views/admin/form/select.phtml
@@ -6,7 +6,28 @@
<div class="wpsg_field_wrap">
- <select id="<?php echo $this->view['field_id']; ?>" name="<?php echo $this->view['field_name']; ?>" class="form-control input-sm" <?php echo $this->view['atts_select']; ?>>
+ <select
+ id="<?php echo $this->view['field_id']; ?>"
+ name="<?php echo $this->view['field_name']; ?>"
+ tabindex="<?php
+
+ if (!isset($GLOBALS['wpsg']['tabindex']))
+ {
+
+ $GLOBALS['wpsg']['tabindex'] = 10;
+
+ }
+ else
+ {
+
+ $GLOBALS['wpsg']['tabindex'] += 10;
+
+ }
+
+ echo $GLOBALS['wpsg']['tabindex'];
+
+ ?>"
+ class="form-control input-sm" <?php echo $this->view['atts_select']; ?>>
<?php
diff --git a/views/admin/konfiguration.phtml b/views/admin/konfiguration.phtml
index 42f1231..1331419 100644
--- a/views/admin/konfiguration.phtml
+++ b/views/admin/konfiguration.phtml
@@ -27,20 +27,22 @@
<?php if ($this->hasMod('wpsg_mod_core')) { ?>
<?php if ($this->arLizenz['l'] == 0) { ?>
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __("Lizenzende", "wpsg"); ?>:
- </div>
- <div class="wpsg_form_right">
- <?php if ($this->getDemoDays() < 0) { ?>
- <p><?php echo wpsg_translate(__('Vor #1# Tage(n) abgelaufen.', 'wpsg'), abs($this->getDemoDays())); ?></p>
- <?php } else { ?>
- <p><?php echo wpsg_translate(__('#1# Tage verbleibend.', 'wpsg'), $this->getDemoDays()); ?></p>
- <?php } ?>
- <a rel="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DemoMode" title="DemoMode" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DemoMode" class="wpsg_form_help"></a>
- </div>
- <div class="wpsg_clear"></div>
- </div>
+ <?php
+
+ if ($this->getDemoDays() < 0)
+ {
+ $strText = wpsg_translate(__('Vor #1# Tage(n) abgelaufen.', 'wpsg'), abs($this->getDemoDays()));
+
+ } else {
+
+ $strText = wpsg_translate(__('#1# Tage verbleibend.', 'wpsg'), $this->getDemoDays());
+
+ }
+
+ echo wpsg_drawForm_Text(__('Lizenzende', 'wpsg'), $strText, '', array('help' => 'DemoMode'));
+
+ ?>
+
<?php } else { ?>
<?php
diff --git a/views/admin/laender.phtml b/views/admin/laender.phtml
index 41c5fdd..dc15790 100644
--- a/views/admin/laender.phtml
+++ b/views/admin/laender.phtml
@@ -41,75 +41,7 @@
<div id="wpsg_country_list">
- <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
- <table class="table wpsg_table_country">
-
- <tr>
- <th class="col_check"><input type="checkbox" onclick="return wpsg_country_check_all();" style="margin-top:-2px;" /></th>
- <th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
- <th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
- <th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>
- <th class="col_action"></th>
- </tr>
-
- <?php foreach ($this->view['data'] as $l) { ?>
- <tr id="<?php echo $l['id']; ?>">
- <td class="col_check"><input type="checkbox" value="1" name="arDelete[<?php echo $l['id']; ?>]" /></td>
- <td class="col_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
- <td class="col_vz">
- <?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
- <?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
- <?php } ?>
- </td>
- <td class="col_mwstsetting">
- <?php if ($l['mwst'] == '2') { ?>
- <?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
- <?php } else if ($l['mwst'] == '1') { ?>
- <?php echo __('keine MwSt.', 'wpsg'); ?>
- <?php } else { ?>
- <?php echo __('mit MwSt.', 'wpsg'); ?>
- <?php } ?>
- </td>
- <td class="col_mwst"><?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
- <?php } ?></td>
- <td class="col_mwst"><?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
- <?php } ?></td>
- <td class="col_mwst"><?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
- <?php } ?></td>
- <td class="col_mwst"><?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
- <?php } ?></td>
- <td class="col_action">
-
- <a href="#" onclick="return wpsg_country_edit('<?php echo $l['id']; ?>');" class="glyphicon glyphicon-pencil"></a>
- <a href="#" class="glyphicon glyphicon-trash"></a>
-
- </td>
- </tr>
- <?php } ?>
-
- <tr>
-
- <td class="col_check"><span class="glyphicon glyphicon-trash"></span></td>
- <td colspan="8">
-
- <input type="submit" name="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" class="button btn-xs" value="<?php echo __('Markierte Länder löschen', 'wpsg'); ?>" />
-
- </td>
-
- </tr>
-
- </table>
- <?php } else { ?>
- <p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?></p>
- <?php } ?>
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_list.phtml'); ?>
</div>
@@ -117,8 +49,13 @@
</form>
- <a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br /><br />
- <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>
+ <a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br />
+ <a href="#" onclick="return wpsg_country_import();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><? echo __('Standardländer importieren.', 'wpsg'); ?></a><br />
+ <a href="#" onclick="return wpsg_country_importEU();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><? echo __('EU-Länder importieren.', 'wpsg'); ?></a><br />
+
+ <br />
+
+ <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>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
@@ -141,6 +78,46 @@
} // function wpsg_country_add()
+ function wpsg_country_import()
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1',
+ success: function(data) {
+
+ jQuery('#wpsg_country_list').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_country_import()
+
+ function wpsg_country_importEU()
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1',
+ success: function(data) {
+
+ jQuery('#wpsg_country_list').html(data);
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_country_importEU()
+
function wpsg_country_save()
{
@@ -167,7 +144,7 @@
jQuery('#Modal_wpsg_country_edit').modal('show');
jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1&land_id' + land_id,
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1&land_id=' + land_id,
success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
} );
@@ -177,221 +154,4 @@
/* ]]> */</script>
-
-
-
-
- <div class="wpsg_admin_box">
-
- <h3>
- <?php echo __('Neues Land hinzufügen', 'wpsg'); ?>
- <a target="_blank" href="http://wpshopgermany.maennchen1.de/?p=839037" class="wpsg_form_help_notip"></a>
- </h3>
-
- <?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_edit.phtml'); ?>
-
- <h3><?php echo __('Bestehende Länder', 'wpsg'); ?></h3>
-
- <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
- <table class="wpsg_admin_laender_list wpsg_admin_table" cellpadding="0" cellspacing="0">
- <tr>
- <th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
- <th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
- <th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
- <th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>
- <th class="col_action"></th>
- </tr>
- <?php $i = 0; foreach ($this->view['data'] as $l) { $i ++; ?>
- <tr id="wpsg_laenderrow_<?php echo $l['id']; ?>" class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
- <td class="col_name data_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
- <td class="col_vz data_vz">
- <?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
- <?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
- <?php } ?>
- </td>
- <td class="col_mwstsetting data_mwst">
- <?php if ($l['mwst'] == '2') { ?>
- <?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
- <?php } else if ($l['mwst'] == '1') { ?>
- <?php echo __('keine MwSt.', 'wpsg'); ?>
- <?php } else { ?>
- <?php echo __('mit MwSt.', 'wpsg'); ?>
- <?php } ?>
- </td>
- <td class="col_mwst data_mwst_a">
- <?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
- <?php } ?>
- </td>
- <td class="col_mwst data_mwst_b">
- <?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
- <?php } ?>
- </td>
- <td class="col_mwst data_mwst_c">
- <?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
- <?php } ?>
- </td>
- <td class="col_mwst data_mwst_d">
- <?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
- <?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
- <?php } ?>
- </td>
- <td class="col_action">
-
- <a class="wpsg_icon wpsg_icon_edit" href="#" onclick="return wpsg_laender_edit(<?php echo $l['id']; ?>);"></a>
- <a class="wpsg_icon wpsg_icon_remove" href="#" onclick="return wpsg_laender_remove(<?php echo $l['id']; ?>);"></a>
-
- </td>
- </tr>
- <?php } ?>
- </table>
- <?php } else { ?>
- <p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?>
- <?php } ?>
-
- <br /><br />
-
- <input type="button" onclick="return wpsg_laender_import();" value="<?php echo __('Standardländer importieren', 'wpsg'); ?>" class="button" />
- <input type="button" onclick="return wpsg_eu_laender_import();" value="<?php echo __('Standard EU-Länder importieren', 'wpsg'); ?>" class="button" />
-
- <script type="text/javascript">/* <![CDATA[ */
-
- var land_load = false;
-
- function wpsg_laender_import()
- {
-
- if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
-
- location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1";
-
- return false;
-
- }
-
- function wpsg_eu_laender_import()
- {
-
- if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
-
- location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1";
-
- return false;
-
- }
-
- function wpsg_laender_save()
- {
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=saveEdit&noheader=1',
- data: {
- form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
- },
- success: function(data) {
-
- if (typeof data === 'object')
- {
-
- land_load = true;
-
- for (var i in data)
- {
-
- jQuery('#wpsg_laenderrow_' + data['id']).find('.data_' + i).html(data[i]);
-
- }
-
- jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
-
- jQuery('#wpsg_laenderrow_edit').remove();
- land_load = false;
-
- } );
-
- }
- else alert(data);
-
- }
- } );
-
- return false;
-
- }
-
- function wpsg_laender_edit(land_id)
- {
-
- if (land_load == true) return; land_load = true;
-
- var edit_timeout = 0;
-
- if (jQuery('#wpsg_laenderrow_edit > td > div').is(':visible'))
- {
-
- edit_timeout = 150;
-
- jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
-
- jQuery('#wpsg_laenderrow_edit').remove();
-
- } );
-
- }
-
- window.setTimeout(function() {
-
- jQuery('#wpsg_laenderrow_' + land_id).after('<tr id="wpsg_laenderrow_edit"><td colspan="8"><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /><div style="display:none;"></div></td></tr>');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1',
- data: {
- land_id: land_id
- },
- success: function(data) {
-
- jQuery('#wpsg_laenderrow_edit > td > div').html(data);
- jQuery('#wpsg_laenderrow_edit > td > img').hide();
- jQuery('#wpsg_laenderrow_edit > td > div').slideDown(300, function() { land_load = false; } );
-
- }
- } );
-
- }, edit_timeout);
-
- return false;
-
- }
-
- function wpsg_laender_remove(land_id)
- {
-
- if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=remove&noheader=1',
- data: {
- land_id: land_id
- },
- success: function(data) {
-
- if (data === "1") jQuery('#wpsg_laenderrow_' + land_id).remove();
- else alert(data);
-
- }
- } );
-
- return false;
-
- }
-
- /* ]]> */</script>
-
- </div>
-
</div> \ No newline at end of file
diff --git a/views/admin/laender_edit.phtml b/views/admin/laender_edit.phtml
index 8886851..2f5725c 100644
--- a/views/admin/laender_edit.phtml
+++ b/views/admin/laender_edit.phtml
@@ -1,5 +1,9 @@
<form id="wpsg_land_edit_form_edit" class="form-horizontal">
+ <?php if (wpsg_isSizedInt($this->view['land']['id'])) { ?>
+ <input type="hidden" name="id" value="<?php echo $this->view['land']['id']; ?>" />
+ <?php } ?>
+
<?php echo wpsg_drawForm_Input('country[name]', __('Ländername', 'wpsg'), wpsg_getStr($this->view['land']['name']), array('help' => 'wpsg_land_name')); ?>
<?php echo wpsg_drawForm_Input('country[kuerzel]', __('Kürzel', 'wpsg'), wpsg_getStr($this->view['land']['kuerzel']), array('help' => 'wpsg_land_kuerzel')); ?>
<?php echo wpsg_drawForm_Select('country[vz]', __('Versandzone', 'wpsg'), $this->view['vz'], wpsg_getStr($this->view['land']['vz']), array('help' => 'wpsg_land_vz')); ?>
@@ -12,6 +16,6 @@
<?php echo wpsg_drawForm_Input('country[mwst_b]', __('MwSt. Satz B (ermäßigter Satz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_b']), array('help' => 'wpsg_land_mwst_b')); ?>
<?php echo wpsg_drawForm_Input('country[mwst_c]', __('MwSt. Satz C (Normalsatz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_c']), array('help' => 'wpsg_land_mwst_c')); ?>
<?php echo wpsg_drawForm_Input('country[mwst_d]', __('MwSt. Satz D (Zwischensatz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_d']), array('help' => 'wpsg_land_mwst_d')); ?>
- <?php echo wpsg_drawForm_Checkbox('country[standard]', __('Standardland', 'wpsg'), wpsg_getStr($this->view['land']['standard']), array('disabled' => ((isset($this->view['land']['standard']) && $this->view['land']['standard'] == '1')?true:false), 'help' => 'wpsg_land_standard')); ?>
+ <?php echo wpsg_drawForm_Checkbox('standard', __('Standardland', 'wpsg'), wpsg_getStr($this->view['land']['standard']), array('disabled' => ((isset($this->view['land']['standard']) && $this->view['land']['standard'] == '1')?true:false), 'help' => 'wpsg_land_standard')); ?>
</form> \ No newline at end of file
diff --git a/views/admin/laender_list.phtml b/views/admin/laender_list.phtml
new file mode 100644
index 0000000..8551f7c
--- /dev/null
+++ b/views/admin/laender_list.phtml
@@ -0,0 +1,87 @@
+<?php
+
+ /** Lieste der Länder im Backend */
+
+?>
+
+<?php echo $this->writeBackendMessage(true); ?>
+
+<?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+ <table class="table wpsg_table_country">
+
+ <thead>
+ <tr>
+ <th class="col_check"><input type="checkbox" onclick="return wpsg_country_check_all();" style="margin-top:-2px;" /></th>
+ <th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
+ <th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
+ <th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <?php foreach ($this->view['data'] as $l) { ?>
+ <tr id="<?php echo $l['id']; ?>" class="<?php echo (($this->get_option('wpsg_defaultland') == $l['id'])?'bg-info':''); ?>">
+ <td class="col_check"><input type="checkbox" value="1" name="arDelete[<?php echo $l['id']; ?>]" /></td>
+ <td class="col_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
+ <td class="col_vz">
+ <?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
+ <?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwstsetting">
+ <?php if ($l['mwst'] == '2') { ?>
+ <?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
+ <?php } else if ($l['mwst'] == '1') { ?>
+ <?php echo __('keine MwSt.', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('mit MwSt.', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst"><?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
+ <?php } ?></td>
+ <td class="col_mwst"><?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
+ <?php } ?></td>
+ <td class="col_mwst"><?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
+ <?php } ?></td>
+ <td class="col_mwst"><?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
+ <?php } ?></td>
+ <td class="col_action">
+
+ <a href="#" onclick="return wpsg_country_edit('<?php echo $l['id']; ?>');" class="glyphicon glyphicon-pencil"></a>
+ <a href="#" class="glyphicon glyphicon-trash"></a>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ <tfoot>
+ <tr>
+
+ <td class="col_check"><span class="glyphicon glyphicon-trash"></span></td>
+ <td colspan="8">
+
+ <input type="submit" name="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" class="button btn-xs" value="<?php echo __('Markierte Länder löschen', 'wpsg'); ?>" />
+
+ </td>
+
+ </tr>
+ </tfoot>
+ </table>
+
+ <br />
+
+ <div class="info"><?php echo __('Das Standardland ist <span class="bg-info">blau</span> markiert und wird für die MwSt. Berechnung im Backend verwendet.', 'wpsg'); ?></div>
+
+<?php } else { ?>
+ <p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?></p>
+<?php } ?>
+
diff --git a/views/css/admin.css b/views/css/admin.css
index 139d3c2..0a9efb8 100644
--- a/views/css/admin.css
+++ b/views/css/admin.css
@@ -38,6 +38,7 @@
#wpsg-bs .table-bordered thead { background-color:#FFFFFF; }
#wpsg-bs .table-body-striped > tbody:nth-of-type(odd) { background-color:#f9f9f9; }
#wpsg-bs .checkbox input { margin-top:1px; }
+#wpsg-bs .info { font-style:italic; }
/* Allgemeine Klassen */
.wpsg_grey { color:#999999; }
@@ -68,6 +69,7 @@
.wpsg_table_country .col_vz { width:100px; }
.wpsg_table_country .col_action { width:60px; text-align:right; }
.wpsg_table_country .col_action a { margin-left:5px; }
+.wpsg_table_country tr:last-child .glyphicon-trash { margin-top:5px; }
/* Tabelle der Berechtigungen */
.wpsg_access_table .wpsg_col_cap { text-align:center; }
diff --git a/views/mods/mod_ordervars/ov_list.phtml b/views/mods/mod_ordervars/ov_list.phtml
index 1cd4655..6224066 100644
--- a/views/mods/mod_ordervars/ov_list.phtml
+++ b/views/mods/mod_ordervars/ov_list.phtml
@@ -25,7 +25,9 @@
<td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
<td class="wpsg_delcol">
- <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
+ <a class="" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);">
+ <span class="glyphicon glyphicon-trash"></span>
+ </a>
<script type="text/javascript">
@@ -78,18 +80,25 @@
function wpsg_removeOV(id)
{
- jQuery.ajax({
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_ov_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
data: {
ov_id: id
},
- success: function(data){
- if (data == 1)
- {
- location.reload();
- }
+ success: function(data) {
+
+ jQuery('#wpsg_ov_list').html(data);
+
}
- });
+ } );
+
+ return false;
+
}
</script>