diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/mods/mod_kundenverwaltung/import.phtml | 85 | ||||
| -rw-r--r-- | views/mods/mod_kundenverwaltung/index.phtml | 2 | ||||
| -rw-r--r-- | views/produkt/import.phtml | 64 |
3 files changed, 100 insertions, 51 deletions
diff --git a/views/mods/mod_kundenverwaltung/import.phtml b/views/mods/mod_kundenverwaltung/import.phtml index 8adc2d8..8be01ea 100644 --- a/views/mods/mod_kundenverwaltung/import.phtml +++ b/views/mods/mod_kundenverwaltung/import.phtml @@ -1,29 +1,74 @@ <?php
/**
- * Template für den Import der Kundendaten
+ * Template für die Importmaske in der Kundenverwaltung
*/
?>
-<div class="wrap">
- <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
- <h2>
- <?php echo __('Kundenimport', 'wpsg'); ?>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=index" class="add-new-h2"><?php echo __("Zurück zur Kundenverwaltung", "wpsg"); ?></a>
- </h2>
+<div class="wpsg_productgroups" id="wpsg-bs">
- <br />
-
- <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import&noheader=1" id="import_form" enctype="multipart/form-data">
-
- <div class="wpsg_hinweis"><?php echo __('Laden Sie ein vorher exportiertes CSV File hoch, die Kundendaten werden dann aus dieser Datei importiert.', 'wpsg'); ?></div>
- <br />
-
- <input type="file" name="wpsg_importfile" />
+ <nav class="navbar navbar-default">
+
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+ </div>
+ <div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo __("Kundenverwaltung - Kundendatenimport", "wpsg"); ?></a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter" id="wpsg-customer-tab-0"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=index" class="add-new-h2" class="add-new-h2"><span class="glyphicon glyphicon-search"></span><?php echo __("Zurück zur Kundenverwaltung", "wpsg"); ?></a></li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid from horizontal" >
+ <div class="row">
+ <div class="col-lg-4">
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import&noheader=1" id="import_form" enctype="multipart/form-data">
- <br /><br />
- <input type="submit" value="<?php echo __('Import starten', 'wpsg'); ?>" class="button-primary" name="wpsg_import" />
-
- </form>
-
+ <div class="wpsg_hinweis"><?php echo __('Laden Sie ein vorher exportiertes CSV File hoch, die Kundendaten werden dann aus dieser Datei importiert.', 'wpsg'); ?></div>
+ <br />
+
+ <input type="file" id="wpsg_importfile" name="wpsg_importfile" />
+
+ <br /><br />
+ <input type="submit" class="button-primary" value="<?php echo __('Import der Kundendaten starten', 'wpsg'); ?>" class="button-primary" name="wpsg_import" />
+
+ </form>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#import_form').on('submit', function(evt) {
+
+ var file = jQuery('#wpsg_importfile')[0].files[0];
+
+ if (file && file.size < <?php echo wpsg_get_file_upload_max_size(); ?>){
+
+ return true;
+
+ } else if (file) {
+
+ alert("<?php echo wpsg_translate(__('Dateigröße übersteigt Upload Limit von #1#.', 'wpsg'), wpsg_formatSize(wpsg_get_file_upload_max_size())); ?>");
+
+ evt.preventDefault();
+ return false;
+
+ } else {
+
+ alert("<?php echo wpsg_translate(__('Es wurde keine Datei ausgewählt.', 'wpsg')); ?>");
+
+ evt.preventDefault();
+ return false;
+
+ }
+
+ } );
+
+ /* ]]> */</script>
+ </div>
+ </div>
+ </div>
</div>
\ No newline at end of file diff --git a/views/mods/mod_kundenverwaltung/index.phtml b/views/mods/mod_kundenverwaltung/index.phtml index 32980d7..032b855 100644 --- a/views/mods/mod_kundenverwaltung/index.phtml +++ b/views/mods/mod_kundenverwaltung/index.phtml @@ -28,7 +28,7 @@ </ul>
<ul class="nav navbar-nav navbar-right">
- <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import&noheader=1"><span class="glyphicon glyphicon-import"></span><?php echo __("Daten-Import", "wpsg"); ?></a></li>
+ <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import"><span class="glyphicon glyphicon-import"></span><?php echo __("Daten-Import", "wpsg"); ?></a></li>
<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?age=wpsg-Customer&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Daten-Export", "wpsg"); ?></a></li>
<?php } ?>
diff --git a/views/produkt/import.phtml b/views/produkt/import.phtml index 40a583a..b90c55f 100644 --- a/views/produkt/import.phtml +++ b/views/produkt/import.phtml @@ -9,20 +9,20 @@ <nav class="navbar navbar-default">
- <div class="container-fluid">
- <div class="navbar-header">
- <a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+ </div>
+ <div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo __("Produktverwaltung - Produktdatenimport", "wpsg"); ?></a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter" id="wpsg-customer-tab-0"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=index" class="add-new-h2"><span class="glyphicon glyphicon-search"></span><?php echo __("Zurück zur Produktverwaltung", "wpsg"); ?></a></li>
+ </ul>
+ </div>
</div>
- <div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
- <ul class="nav navbar-nav">
- <li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo __("Produktverwaltung - Produktimport", "wpsg"); ?></a></li>
- </ul>
- <ul class="nav navbar-nav navbar-right">
- <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter" id="wpsg-customer-tab-0"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=index" class="add-new-h2"><span class="glyphicon glyphicon-search"></span><?php echo __("Zurück zur Produktverwaltung", "wpsg"); ?></a></li>
- </ul>
- </div>
- </div>
-
+ </nav>
<div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid from horizontal" >
<div class="row">
<div class="col-lg-4">
@@ -35,34 +35,38 @@ <input type="file" id="wpsg_importfile" name="wpsg_importfile" />
<br /><br />
- <input type="submit" class="button-primary" value="<?php echo __('Import starten', 'wpsg'); ?>" name="wpsg_import" />
+ <input type="submit" class="button-primary" value="<?php echo __('Import der Produktedaten starten', 'wpsg'); ?>" name="wpsg_import" />
</form>
<script type="text/javascript">/* <![CDATA[ */
-
+
jQuery('#import_form').on('submit', function(evt) {
-
+
var file = jQuery('#wpsg_importfile')[0].files[0];
-
- if (file && file.size < <?php echo wpsg_get_file_upload_max_size(); ?>)
- {
-
+
+ if (file && file.size < <?php echo wpsg_get_file_upload_max_size(); ?>){
+
return true;
-
- }
- else
- {
-
+
+ } else if (file) {
+
alert("<?php echo wpsg_translate(__('Dateigröße übersteigt Upload Limit von #1#.', 'wpsg'), wpsg_formatSize(wpsg_get_file_upload_max_size())); ?>");
-
+
evt.preventDefault();
return false;
-
- }
-
- } );
+
+ } else {
+
+ alert("<?php echo wpsg_translate(__('Es wurde keine Datei ausgewählt.', 'wpsg')); ?>");
+ evt.preventDefault();
+ return false;
+
+ }
+
+ } );
+
/* ]]> */</script>
</div>
|
