summaryrefslogtreecommitdiff
path: root/views/admin/kundendaten.phtml
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-03-22 13:59:16 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-03-22 13:59:16 +0000
commit0fc69ce3ad89844dd5fb2f87532e7b6fca55923d (patch)
treeb89a251b26e0726a80c4c24eb0b726f1bbaeea62 /views/admin/kundendaten.phtml
parentc14a7c20ec8c489a37412cebb524e367679f5a60 (diff)
- sync
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5439 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/admin/kundendaten.phtml')
-rw-r--r--views/admin/kundendaten.phtml184
1 files changed, 119 insertions, 65 deletions
diff --git a/views/admin/kundendaten.phtml b/views/admin/kundendaten.phtml
index 6896577..4c65f1d 100644
--- a/views/admin/kundendaten.phtml
+++ b/views/admin/kundendaten.phtml
@@ -5,84 +5,138 @@
*/
?>
+
<div class="wpsg_admin_submenu">
- <div class="head">
- <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
- <div style="clear:both;"></div>
- </div>
-
- <ul>
- <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
- <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <div class="list-group">
+ <span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <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&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
<?php } ?>
- </ul>
-
+ </div>
+
</div>
-<div class="wpsg_admin_content">
- <div class="wpsg_admin_box" id="wpsg_tab">
-
- <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
-
- <div class="head">
- <div class="title">
- <div class="tab" id="tab1"><?php echo __('Pfllichtfelder', 'wpsg'); ?></div>
- <div class="tab" id="tab2"><?php echo __('Weitere Kundendaten', 'wpsg'); ?></div>
- <div class="tabcontent tablink">
- <a href="" title="<?php echo __('Neues Kundenfeld hinzufügen', 'wpsg'); ?>" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addCustomField();"></a>
+<!-- Modal -->
+<div class="modal fade" id="wpsg_code_dialog" tabindex="-1" role="dialog">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="myModalLabel"><?php echo __('HTML Code Block', 'wpsg'); ?></h4>
+ </div>
+ <div class="modal-body">
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="wpsg_admin_content form-horizontal wpsg_customerfield">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <div class="panel panel-default">
+ <div class="panel-heading clearfix">
+ <h3 class="panel-title"><?php echo __('Kundendaten', 'wpsg'); ?></h3>
+ </div>
+ <div class="panel-body">
+
+ <ul class="nav nav-tabs" role="tablist">
+ <li role="presentation" class="active"><a href="#tabcontent1" role="tab" aria-controls="tabcontent1" data-toggle="tab"><?php echo __('Pfllichtfelder', 'wpsg'); ?></a></li>
+ <li role="presentation" class=""><a href="#tabcontent2" role="tab" aria-controls="tabcontent2" data-toggle="tab"><?php echo __('Weitere Kundendaten', 'wpsg'); ?></a></li>
+ <li role="presentation" class=""><a href="#tabcontent3" role="tab" aria-controls="tabcontent3" data-toggle="tab"><?php echo __('Kundenvoreinstellungen', 'wpsg'); ?></a></li>
+ </ul>
+
+ <div class="tab-content">
+ <div role="tabpanel" id="tabcontent1" class="tab-pane active">
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab1.phtml'); ?>
+ </div>
+ <div role="tabpanel" id="tabcontent2" class="tab-pane">
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab2.phtml'); ?>
+ </div>
+ <div role="tabpanel" id="tabcontent3" class="tab-pane">
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab3.phtml'); ?>
</div>
- <div class="wpsg_clear"></div>
- </div>
- </div>
- <div class="content" id="wpsg_mwst_list">
-
- <div id="tabcontent1" class="tabcontent">
- <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab1.phtml'); ?>
- </div>
- <div id="tabcontent2" class="tabcontent">
-
- <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab2.phtml'); ?>
-
</div>
-
+
</div>
+ </div>
+
+ <p calss="submit"><input type="submit" value="<?php echo __('Einstellungen Speichern', 'wpsg'); ?>" class="button-primary" /></p>
+
+ </form>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Fügt ein neues Feld in die Liste der Kundenvariablen ein und lädt die Liste neu
+ */
+ function wpsg_addCustomField()
+ {
+
+ jQuery('#tabcontent2').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
- <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#tabcontent2').html(data);
+ }
+ } );
+
+ return false;
- </form>
-
- <script type="text/javascript">
+ } // function wpsg_addCustomField()
+
+ /**
+ * Löscht eine Kundenvariable und entfernt die Zeile aus der Liste
+ */
+ function wpsg_removeCustomField(kv_index)
+ {
- /**
- * Wird beim hinzufügen eines benutzerdefinierten Kundenfeldes aufgerufen
- */
- function wpsg_addCustomField()
- {
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery('.wpsg_customervar_row_' + kv_index).hide(250, function() { jQuery(this).remove(); } );
- jQuery('#tabcontent2').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&subaction=kundendaten&do=add&noheader=1',
- success: function(data) {
- jQuery('#tabcontent2').html(data);
- }
- } );
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=remove&noheader=1',
+ data: {
+ 'kv_index': kv_index
+ },
+ success: function(data) {
- return false;
-
- } // function wpsg_addCustomField()
-
- jQuery(document).ready(function() {
- jQuery('#wpsg_tab').wpsg_tab( {
- 'cookiename': 'wpsg_kundendaten_tab',
- 'tab2': function() {
- jQuery('.tablink').show();
- }
- } );
+ if (data != "1") alert(data);
+
+ }
} );
+
+ return false;
+
+ } // function wpsg_removeCustomField(kv_index)
- </script>
-
- </div>
+ /**
+ * Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
+ */
+ function wpsg_genKVCode(kv_index)
+ {
+
+ jQuery('#wpsg_code_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery('#wpsg_code_dialog').modal( { } )
+
+ jQuery.ajax( {
+ url: 'admin.php?page=wpsg-Admin&subaction=kundendaten&noheader=1&show=code',
+ data: { 'kv_id': kv_index },
+ success: function(data) { jQuery('#wpsg_code_dialog .modal-body').html(data); }
+ } );
+
+ return false;
+
+ } // function wpsg_genPACode(pa_id)
+
+ /* ]]> */</script>
+
</div> \ No newline at end of file